-
Notifications
You must be signed in to change notification settings - Fork 2
/
urls.py
32 lines (24 loc) · 1016 Bytes
/
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 *
from django.conf import settings
from django.views.generic.simple import direct_to_template
from django.contrib import admin
import os.path
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'clusters.views.featured_cluster', name="featured_cluster"),
(r'^clusters/', include('clusters.urls')),
(r'^account/', include('account.urls')),
# admin
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
(r'^accounts/login/$', 'django.contrib.auth.views.login'),
# emails
url(r'^sendemail/$', 'clusters.views.send_email', name="send_email"),
url(r'^email_sent/$', direct_to_template,
{"template": "clusters/email_sent.html"}, name="email_sent"),
)
if settings.DEBUG:
urlpatterns += patterns('',
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': os.path.join(os.path.dirname(__file__), "site_media")}),
)