-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathurls.py
More file actions
executable file
·43 lines (33 loc) · 1.17 KB
/
Copy pathurls.py
File metadata and controls
executable file
·43 lines (33 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from django.conf.urls.defaults import patterns, include, url
from django.views.generic import ListView, DetailView
from knowledgeBase.models import Memo, Article, Faq, Library
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^$', 'knowledgeBase.views.index'),
(r'^article/(?P<pk>\d+)/$',
DetailView.as_view(
model=Article
)),
(r'^article/$', ListView.as_view(
model=Article,
)),
(r'^faq/$', ListView.as_view(
model=Faq,
)),
(r'^library/(?P<pk>\d+)/$',
DetailView.as_view(
model=Library
)),
(r'^library/$', ListView.as_view(
model=Library,
)),
(r'^memos/(?P<pk>\d+)/$',
DetailView.as_view(
model=Memo
)),
(r'^memos/$', ListView.as_view(
model=Memo,
)),
(r'^admin/', include(admin.site.urls)),
)