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
30
31
32
33
34
35
|
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/$', 'pdfitem',),
(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\-\_\/]*\.svg/?)$', 'figure',),
(r'^(?P<reqslug>[\w\-\_\/]*\.png)/download/$', 'figure',{'download':True}),
(r'^(?P<reqslug>[\w\-\_\/]*\.gif)/download/$', 'figure',{'download':True}),
(r'^(?P<reqslug>[\w\-\_\/]*\.jpg)/download/$', 'figure',{'download':True}),
(r'^(?P<reqslug>[\w\-\_\/]*\.jpeg)/download/$','figure',{'download':True}),
(r'^(?P<reqslug>[\w\-\_\/]*\.svg)/download/$', 'figure',{'download':True}),
(r'^(?P<reqslug>[\w\-\_\/]*)$', 'tree',),
)
|