forked from FLOSolutions/permabank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.py
49 lines (38 loc) · 1.35 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""
Permabank URL Mapping
"""
from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.views.generic import TemplateView
from views import HomeView
import admin_site
urlpatterns = patterns('',
# home page
url(r'^$', HomeView.as_view(), name='home'),
# profiles and authentication
url(r'^openid/', include('django_openid_auth.urls')),
# todo: successful logout should add an alert, in the style of flask.flash
url(r'^logout/$', 'django.contrib.auth.views.logout',
kwargs={'next_page': settings.LOGOUT_REDIRECT_URL}, name='logout'),
url(r'^profiles/', include('profiles.urls')),
# messaging
(r'^messages/', include('django_messages.urls')),
# admin
url(r'^grappelli/', include('grappelli.urls')),
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
# tinymce
url(r'^tinymce/', include('tinymce.urls')),
# search
(r'^search/', include('haystack.urls')),
# records
url(r'', include('records.urls')),
)
if settings.DEBUG:
# when running locally, Django should serve static files
urlpatterns += patterns('',
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT,
}),
)