Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tag: v1.2
Fetching contributors…

Cannot retrieve contributors at this time

47 lines (39 sloc) 1.47 KB
from django.conf import settings
from django.conf.urls.defaults import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from .static_site import urls
from funfactory.monkeypatches import patch
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
urlpatterns = patterns('',
# Example:
(r'', include(urls)),
(r'', include('')),
(r'', include('gameon.users.urls')),
(r'', include('gameon.submissions.urls')),
(r'^browserid/', include('django_browserid.urls')),
# Generate a robots.txt
lambda r: HttpResponse(
"User-agent: *\n%s: /" % 'Allow' if settings.ENGAGE_ROBOTS else 'Disallow',
# Uncomment the admin/doc line below to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(,
## In DEBUG mode, serve media files through Django.
if settings.DEBUG:
# Remove leading and trailing slashes so the regex matches.
media_url = settings.MEDIA_URL.lstrip('/').rstrip('/')
urlpatterns += patterns(
(r'^%s/(?P<path>.*)$' % media_url, 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
urlpatterns += staticfiles_urlpatterns()
Jump to Line
Something went wrong with that request. Please try again.