urls.py 1.47 KB
Newer Older
1
2
3
4
5
from django.conf.urls import patterns, include, url

from django.contrib import admin
admin.autodiscover()

6
7
8
handle404 = "error_404"
handle500 = "error_500"

9
10
urlpatterns = patterns('go.views',

11
    # / - Homepage url.
12
    url(r'^$', 'index', name='index'),
13

Jean Michel Rouly's avatar
Jean Michel Rouly committed
14
    # /view/<short> - View URL data.
15
    url(r'^view/(?P<short>\w+)$', 'view', name='view'),
16

17
    # /about - About page.
18
    url(r'^about/?$', 'about', name='about'),
19

Jean Michel Rouly's avatar
Jean Michel Rouly committed
20
    # /signup - Signup page for access.
21
    url(r'^signup/?$', 'signup', name='signup'),
Jean Michel Rouly's avatar
Jean Michel Rouly committed
22

23
    # /my - My-Links page, view and review links.
24
    url(r'^my/?$', 'my_links', name='my_links'),
25

Jean Michel Rouly's avatar
Jean Michel Rouly committed
26
    # /delete/<short> - Delete a link, no content display.
27
    url(r'^delete/(?P<short>\w+)$', 'delete', name='delete'),
28

29
    # /registered - registration complete page
30
    url(r'^registered/?$', 'registered', name='registered'),
31

32
    # /admin - Administrator interface.
33
    url(r'^admin/?', include(admin.site.urls)),
34

Chris Reffett's avatar
Chris Reffett committed
35
36
    # /useradmin - user approval interface
    url(r'^useradmin/?$', 'useradmin', name='useradmin'),
David Haynes's avatar
David Haynes committed
37
38

    url(r'^test/?$', 'test', name='test')
39
)
40
41
42
43

urlpatterns += patterns('django.contrib.auth.views',

    # Auth pages
44
    url(r'^login$', 'login', name='go_login'),
45
    url(r'^logout$', 'logout', {'next_page': '/'},
46
        name='go_logout'),
47
)
Jean Michel Rouly's avatar
Jean Michel Rouly committed
48
49
50

urlpatterns += patterns('go.views',
    # Redirection regex.
51
    url(r'^(?P<short>\w+)$', 'redirection', name='redirection'),
Jean Michel Rouly's avatar
Jean Michel Rouly committed
52
)
53
54
55
56
57

# Captcha support
urlpatterns += patterns('',
    url(r'^captcha/', include('captcha.urls')),
)