source: branches/exodus-roland/exodus/urls.py@ 6411

Last change on this file since 6411 was 6411, checked in by roland, 16 years ago

A check in with some addons, still code in progress.
Some niceties in admin.

File size: 1.4 KB
Line 
1# (c) Roland van Laar
2
3from django.conf.urls.defaults import *
4from exodus.models import *
5from os import path as os_path
6from django.conf import settings
7from django.views.generic.simple import direct_to_template
8from django.contrib import databrowse
9from django.contrib import admin
10admin.autodiscover()
11
12urlpatterns = patterns('',
13 # generic view
14 url(r'^$', 'exodus.urls.direct_to_template', {'template': 'index.html'}, \
15 "root"),
16 (r'^view/nodelist/$', 'exodus.views.viewNodelist'),
17 (r'^view/list/(?P<model>.+)/$', 'exodus.views.viewList'),
18 (r'^view/node/(?P<node>.+)/$', 'exodus.views.viewNode'),
19
20 # config urls
21 (r'^config/(?P<version>.+)/(?P<node>.+)/(?P<file>.+)$', 'exodus.views.configFile'),
22
23 # Generic urls
24 (r'^(?P<mode>(add|edit|delete))/node/(?P<node>.+)/$', 'exodus.views.genericNode'),
25 (r'^(?P<mode>(add|edit|delete))/nic/(?P<node>.+)/(?P<interface>.+)/$', 'exodus.views.genericInterface'),
26 (r'^(?P<mode>(add|edit|delete))/dhcp/(?P<node>.+)/(?P<interface>.+)/(?P<publicAP>.+)/$', 'exodus.views.genericPublicAP'),
27 (r'^(?P<mode>(add|edit|delete))/(?P<model>.+)/(?P<object>.+)/$', 'exodus.views.genericModel'),
28
29 # 3th party/embedded database browser
30 (r'^databrowse/(.*)', databrowse.site.root),
31
32 (r'^admin/(.*)', admin.site.root),
33)
34
35if settings.DEBUG:
36 urlpatterns += patterns('',
37 url(r'^static/(?P<path>.*)$$', 'django.views.static.serve', {'document_root':
38 settings.EXODUS_STATIC_ROOT }, "static"),
39 )
Note: See TracBrowser for help on using the repository browser.