-
Notifications
You must be signed in to change notification settings - Fork 2
/
urls.py
32 lines (29 loc) · 1.05 KB
/
urls.py
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
from django.conf.urls.defaults import *
from django.contrib.auth.decorators import login_required
from django.views.generic.list_detail import object_list
import settings
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'views.index', name="index"),
url(r'^about/$', 'django.views.generic.simple.direct_to_template',
{'template': 'misc/about.html'}, name="about"),
url(r'^help/$', 'django.views.generic.simple.direct_to_template',
{'template': 'misc/help.html'}, name="help"),
url(
r'^settings/$',
'django.views.generic.simple.direct_to_template',
{'template': 'misc/settings.html'},
name='settings'
),
(r'^recipes/', include('recipes.urls')),
(r'^admin/', include(admin.site.urls)),
(r'^accounts/', include('registration.urls')),
(r'^accounts/login/$', 'django.contrib.auth.views.login'),
)
if settings.DEBUG:
urlpatterns += patterns('',
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT,
'show_indexes' :True
}))