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

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('go.views',

8
    # / - Homepage url.
9
    url(r'^$', 'index', name = 'index'),
10

11 12 13
    # / - Successful url registration page.
    url(r'^success$', 'success', name = 'success'),

14 15 16
    # /about - About page.
    url(r'^about/?$', 'about', name = 'about'),

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

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

23 24 25
    # /delete - Delete a link, no content display.
    url(r'^delete/(?P<short>\w+)$', 'delete', name = 'delete'),

26
    # /admin - Administrator interface.
27
    url(r'^admin/?', include(admin.site.urls)),
28
)
29 30 31 32 33

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

    # Auth pages
    url(r'^login$', 'login', {'template_name' : 'login.html'},
34
        name='go_login'),
35
    url(r'^logout$', 'logout', {'next_page' : '/'},
36
        name='go_logout'),
37
)
Jean Michel Rouly's avatar
Jean Michel Rouly committed
38 39 40 41 42

urlpatterns += patterns('go.views',
    # Redirection regex.
    url(r'^(?P<short>\w+)$', 'redirection', name = 'redirection'),
)