-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.py
36 lines (30 loc) · 1.49 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
# -*- coding: utf-8 -*-
"""URLs for testing myPLfrontend."""
from django.conf import settings
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# admin stuff
#(r'^admin/doc/', include('django.contrib.admindocs.urls')),
#(r'^admin/(.*)', 'admin.site.root'),
(r'^accounts/login/$', 'django.contrib.auth.views.login'),
(r'^accounts/logout/$', 'django.contrib.auth.views.logout'),
(r'^accounts/password_change/$', 'django.contrib.auth.views.password_change'),
(r'^accounts/password_change/done/$', 'django.contrib.auth.views.password_change_done'),
(r'^accounts/password_reset/$', 'django.contrib.auth.views.password_reset'),
(r'^accounts/password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),
# this is where login without source url goes
(r'^accounts/profile/', 'django.views.generic.simple.redirect_to', {'url' : '/'}),
# ensure requests to favicon don't clutter logs
(r'favicon.ico', 'django.views.generic.simple.redirect_to', {'url': 'http://s.hdimg.net/layout06/favicon.png'}),
# include myplfrontend
(r'^myplfrontend/', include('myplfrontend.urls')),
(r'^$', 'django.views.generic.simple.redirect_to', {'url' : '/myplfrontend/'}),
)
# when in development mode, serve static files 'by hand'
# in production the files should be placed at http://s.hdimg.net/myplfrontend/
if settings.DEBUG:
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': './static'}),
)