urls.py 1.43 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'),
37
)
38 39 40 41

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

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

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

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