root / urls.py.dist @ 4d02b9bc
History | View | Annotate | Download (2.2 kB)
1 | caa2fd80 | Leonidas Poulopoulos | from django.conf.urls.defaults import * |
---|---|---|---|
2 | 46a6064c | Leonidas Poulopoulos | from django.views.generic.simple import direct_to_template |
3 | caa2fd80 | Leonidas Poulopoulos | from django.conf import settings |
4 | caa2fd80 | Leonidas Poulopoulos | # Uncomment the next two lines to enable the admin: |
5 | caa2fd80 | Leonidas Poulopoulos | from django.contrib import admin |
6 | caa2fd80 | Leonidas Poulopoulos | admin.autodiscover() |
7 | caa2fd80 | Leonidas Poulopoulos | |
8 | caa2fd80 | Leonidas Poulopoulos | urlpatterns = patterns('', |
9 | caa2fd80 | Leonidas Poulopoulos | # Example: |
10 | caa2fd80 | Leonidas Poulopoulos | # (r'^fod/flowspy/', include('flowspy.foo.urls')), |
11 | caa2fd80 | Leonidas Poulopoulos | (r'^fod/poll/', include('flowspy.poller.urls')), |
12 | caa2fd80 | Leonidas Poulopoulos | # url(r'^fod/?$', 'flowspy.flowspec.views.user_routes', name="user-routes"), |
13 | caa2fd80 | Leonidas Poulopoulos | url(r'^fod/?$', 'flowspy.flowspec.views.group_routes', name="group-routes"), |
14 | caa2fd80 | Leonidas Poulopoulos | url(r'^fod/profile/?$', 'flowspy.flowspec.views.user_profile', name="user-profile"), |
15 | caa2fd80 | Leonidas Poulopoulos | url(r'^fod/add/?$', 'flowspy.flowspec.views.add_route', name="add-route"), |
16 | caa2fd80 | Leonidas Poulopoulos | #url(r'^fod/addrl/?$', 'flowspy.flowspec.views.add_rate_limit', name="add-rate-limit"), |
17 | caa2fd80 | Leonidas Poulopoulos | url(r'^fod/addport/?$', 'flowspy.flowspec.views.add_port', name="add-port"), |
18 | caa2fd80 | Leonidas Poulopoulos | url(r'^fod/edit/(?P<route_slug>[\w\-]+)/$', 'flowspy.flowspec.views.edit_route', name="edit-route"), |
19 | caa2fd80 | Leonidas Poulopoulos | url(r'^fod/delete/(?P<route_slug>[\w\-]+)/$', 'flowspy.flowspec.views.delete_route', name="delete-route"), |
20 | caa2fd80 | Leonidas Poulopoulos | url(r'^fod/login/?', 'flowspy.flowspec.views.user_login', name="login"), |
21 | caa2fd80 | Leonidas Poulopoulos | url(r'^fod/welcome/?', 'flowspy.flowspec.views.welcome', name="welcome"), |
22 | caa2fd80 | Leonidas Poulopoulos | url(r'^fod/logout/?', 'flowspy.flowspec.views.user_logout', name="logout"), |
23 | caa2fd80 | Leonidas Poulopoulos | (r'^fod/setlang/?$', 'django.views.i18n.set_language'), |
24 | caa2fd80 | Leonidas Poulopoulos | # Uncomment the admin/doc line below to enable admin documentation: |
25 | caa2fd80 | Leonidas Poulopoulos | (r'^fod/admin/doc/', include('django.contrib.admindocs.urls')), |
26 | caa2fd80 | Leonidas Poulopoulos | url(r'^fod/load_js/(?P<file>[\w\s\d_-]+)/$', 'flowspy.flowspec.views.load_jscript', name="load-js"), |
27 | caa2fd80 | Leonidas Poulopoulos | |
28 | 46a6064c | Leonidas Poulopoulos | url(r'^fod/accounts/activate/(?P<activation_key>\w+)/$', 'accounts.views.activate', name='activate_account'), |
29 | 46a6064c | Leonidas Poulopoulos | url(r'^fod/activate/complete/$', |
30 | 46a6064c | Leonidas Poulopoulos | direct_to_template, |
31 | 46a6064c | Leonidas Poulopoulos | { 'template': 'registration/activation_complete.html' }, |
32 | 46a6064c | Leonidas Poulopoulos | name='registration_activation_complete'), |
33 | 46a6064c | Leonidas Poulopoulos | |
34 | caa2fd80 | Leonidas Poulopoulos | # Uncomment the next line to enable the admin: |
35 | caa2fd80 | Leonidas Poulopoulos | (r'^fod/admin/', include(admin.site.urls)), |
36 | 46a6064c | Leonidas Poulopoulos | |
37 | caa2fd80 | Leonidas Poulopoulos | ) |
38 | caa2fd80 | Leonidas Poulopoulos | |
39 | caa2fd80 | Leonidas Poulopoulos | |
40 | caa2fd80 | Leonidas Poulopoulos | if settings.DEBUG: |
41 | caa2fd80 | Leonidas Poulopoulos | urlpatterns += patterns('', |
42 | caa2fd80 | Leonidas Poulopoulos | (r'^fod/static/(?P<path>.*)', 'django.views.static.serve',\ |
43 | caa2fd80 | Leonidas Poulopoulos | {'document_root': settings.STATIC_URL}), |
44 | caa2fd80 | Leonidas Poulopoulos | ) |