forked from pjreddie/WRed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
executable file
·37 lines (31 loc) · 1.28 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
#Author: Joe Redmon
#urls.py
import sys
#sys.path.append('/home/alex/Desktop/WRed')
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from WRed.display.views import *
from django.http import HttpResponse
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
static_files_dict = {
'document_root': os.path.join(SITE_ROOT, 'media/'),
}
urlpatterns = patterns('',
# (r'^$', direct_to_template, {'template':'index.html'}),
(r'^WRed/', include('WRed.display.urls')),
# Example:
# (r'^WRed/', include('WRed.foo.urls')),
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
(r'^robots\.txt$', lambda r: HttpResponse("User-agent: *\nDisallow: /*", mimetype="text/plain")),
# Remove below when moving to production server
(r'^media/(?P<path>.*)$', 'django.views.static.serve', static_files_dict),
(r'^accounts/login/$', login_view),
(r'^accounts/logout/$', logout_view),
)