source: dashwiki/urls.py @ a32cc8ed053a478f3602199b2df8ddcbf8e2de88

Revision a32cc8ed053a478f3602199b2df8ddcbf8e2de88, 935 bytes checked in by Stanislaw Klekot <dozzie@…>, 7 years ago (diff)

Added proper URLs to static files.

This is a wild hack on Django templates, but I couldn't get anything better at
the moment.

  • Property mode set to 100644
Line 
1from django.conf.urls.defaults import *
2
3# Uncomment the next two lines to enable the admin:
4# from django.contrib import admin
5# admin.autodiscover()
6
7urlpatterns = patterns('wiki.views',
8  # FIXME: these two are fugly way of calling display_wiki()
9  (r'^$',     'handle_wiki', {'page_name': 'WikiStart'}),
10  (r'^wiki$', 'handle_wiki', {'page_name': 'WikiStart'}),
11  (r'^wiki/', include('wiki.urls')),
12  (r'^newpage', 'create_wiki'),
13  (r'^history', 'list_history'),
14  (r'^pages',   'list_pages'),
15
16  (r'^macros/?$', 'list_macros'),
17  (r'^macros/create/?$', 'create_macro'),
18  (r'^macros/edit/(?P<macro_name>[a-zA-Z0-9_]+)$',   'edit_macro'),
19  (r'^macros/remove/(?P<macro_name>[a-zA-Z0-9_]+)$', 'remove_macro'),
20
21  (r'^login/?$',  'login'),
22  (r'^logout/?$', 'logout'),
23)
24
25urlpatterns += patterns('',
26  url(
27    r'^media/(?P<path>.*)$',
28    'django.views.static.serve', { 'document_root': 'media' },
29    name = "static_media"
30  ),
31)
Note: See TracBrowser for help on using the repository browser.