root / urls.py @ 04733cdb
History | View | Annotate | Download (1.1 kB)
1 |
from django.conf.urls.defaults import * |
---|---|
2 |
from django.conf import settings |
3 |
# Uncomment the next two lines to enable the admin:
|
4 |
from django.contrib import admin |
5 |
admin.autodiscover() |
6 |
|
7 |
urlpatterns = patterns('',
|
8 |
|
9 |
# Example:
|
10 |
# (r'^lunstats/', include('lunstats.foo.urls')),
|
11 |
|
12 |
# Uncomment the admin/doc line below to enable admin documentation:
|
13 |
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
14 |
|
15 |
# Uncomment the next line to enable the admin:
|
16 |
(r'^admin/', include(admin.site.urls)),
|
17 |
) |
18 |
|
19 |
urlpatterns += patterns('core.views',
|
20 |
url(r'^$', 'index', name='index'), |
21 |
url(r'^(?P<graph_id>\d+)/graphjson/$', 'graphjson', name="graphjson"), |
22 |
url(r'^(?P<graph_id>\d+)/draw/$', 'drawpng',name="drawpng"), |
23 |
(r'^(?P<graph_id>\d+)/draw/(?P<start>[\\:\w\d\s\.+-]+),(?P<end>[\\:\w\d\s\.+-]+)/?$', 'drawpng'), |
24 |
url(r'^graphperiods/(?P<graph_id>\d+)/$', 'graphperiods', name='graphperiods'), |
25 |
url(r'^(?P<graph_id>\d+)/thumb/$', 'thumb', name='get-thumbnail'), |
26 |
|
27 |
|
28 |
) |
29 |
|
30 |
if settings.DEBUG:
|
31 |
urlpatterns += patterns('',
|
32 |
(r'^static/(?P<path>.*)', 'django.views.static.serve',\ |
33 |
{'document_root': settings.STATIC_URL}),
|
34 |
) |