-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
40 lines (32 loc) · 1.5 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
# -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# statics are served outside
(r'^$',
'django.views.generic.simple.redirect_to',
{'url': 'main/',
# can we make this a call, instead of a string?
'query_string': True,
'permanent': False,
# SET THIS TO TRUE IN PRODUCTION!
}),
# the media files SHOULD be served as the statics
(r'media/(.*)',
'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
# admin
#url(r'^admin/', include(admin.site.urls)),
# log in/out
# url(r'login/$',
# 'django.contrib.auth.views.login',
# name='login'),
# url(r'logout/$',
# 'django.contrib.auth.views.logout',
# name='logout'),
(r'^main/', include('main.urls',
namespace='main')),
)