-
Notifications
You must be signed in to change notification settings - Fork 7
/
urls.py
28 lines (25 loc) · 1.34 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
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^accounts/', include('registration.urls')),
(r'^games/', include('games.urls')),
(r'^vote', include('vote.urls')),
(r'^admin/', include(admin.site.urls)),
url(r'^$', direct_to_template, {'template': 'static/home.html'}, name='home'),
url(r'^how$', direct_to_template, {'template': 'static/how.html'}, name='how'),
url(r'^rules$', direct_to_template, {'template': 'static/rules.html'}, name='rules'),
url(r'^fineprint$', direct_to_template, {'template': 'static/fineprint.html'}, name='fineprint'),
url(r'^prizes$', direct_to_template, {'template': 'static/prizes.html'}, name='prizes'),
url(r'^judges$', direct_to_template, {'template': 'static/judges.html'}, name='judges'),
url(r'^judging$', direct_to_template, {'template': 'static/judging.html'}, name='judging'),
url(r'^resources$', direct_to_template, {'template': 'static/resources.html'}, name='resources'),
)
if settings.DEBUG:
media_url = settings.MEDIA_URL.lstrip('/').rstrip('/')
urlpatterns += patterns('',
(r'^%s/(?P<path>.*)$' % media_url, 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)