aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/git_wiki/urls.py
blob: 2570f0585f3a0a1fc64f98ee4b31236efb8c9059 (plain)
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
from django.conf.urls.defaults import *
from django.conf import settings

from models import *

try:
    ADMIN_URL = settings.ADMIN_URL
except AttributeError:
    ADMIN_URL='/admin'
if ADMIN_URL[-1] == '/':
    ADMIN_URL=ADMIN_URL[:-1]

info_dict = { 'extra_context': { 'admin_url': ADMIN_URL,
                                 } }

urlpatterns = patterns('bn_django.git_wiki.views',
    (r'^(?P<hash>[0-9a-z]{40})/$', 'olditem',),
    (r'^commit/(?P<hash>[0-9a-z]{40})/$', 'view_commit',),
    (r'^(?P<reqslug>[\w\-\_\/]*)/log/$', 'tree',), 
    (r'^(?P<reqslug>[\w\-\_\/]*)/edit/$', 'tree',),
    (r'^(?P<reqslug>[\w\-\_\/]*)/pdf/$', 'tree',),
    (r'^(?P<reqslug>[\w\-\_\/]*)/raw/$', 'rawitem',),
    (r'^(?P<reqslug>[\w\-\_\/]*)/latex/$', 'latexitem',),
    (r'^(?P<reqslug>[\w\-\_\/]*\.png/?)$', 'figure',), 
    (r'^(?P<reqslug>[\w\-\_\/]*\.gif/?)$', 'figure',), 
    (r'^(?P<reqslug>[\w\-\_\/]*\.jpg/?)$', 'figure',), 
    (r'^(?P<reqslug>[\w\-\_\/]*\.jpeg/?)$', 'figure',), 
    (r'^(?P<reqslug>[\w\-\_\/]*)$', 'tree',), 
)