-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.py
32 lines (26 loc) · 1.26 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 patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.conf import settings
from django.contrib import admin
from django.views.generic import RedirectView
from django.contrib.auth.views import login, logout
admin.autodiscover()
urlpatterns = i18n_patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^sightings', include('sightings.urls')),
url(r'^', include('cms.urls')),
)
urlpatterns += patterns('',
url(r'^favicon\.ico$',
RedirectView.as_view(url=settings.STATIC_URL + 'img/favicon.ico')),
url(r'^gallery/', include('imagestore.urls', namespace='imagestore')),
url(r'^tinymce/', include('tinymce.urls')),
# Fallback for URLs not handled by CMS pages (i.e. logout)
url(r'^accounts/', include('accounts.urls')),
)
if settings.DEBUG:
urlpatterns = patterns('',
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
url(r'', include('django.contrib.staticfiles.urls')),
) + urlpatterns