Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 29 lines (25 sloc) 978 Bytes
import settings
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.static import serve
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
urlpatterns = patterns('',
(r'^admin/', include(,
(r'^/', include('gate.urls')),
(r'iphone-media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT})
if settings.DEBUG:
from django.views.static import serve
_media_url = settings.MEDIA_URL
if _media_url.startswith('/'):
_media_url = _media_url[1:]
urlpatterns += patterns('',
(r'^%s(?P<path>.*)$' % _media_url, serve, {'document_root': settings.MEDIA_ROOT})
del(_media_url, serve)
urlpatterns += patterns('',
(r'^iphone/', direct_to_template, {'template': 'iphone.html'}),
(r'^.*', direct_to_template, {'template': 'default.html'}),