urls.py 630 Bytes
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 9 10 11 12 13 14
    # / - Homepage url.
    url(r'^$', 'index', name = 'homepage'),

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

    # /admin - Administrator interface.
15 16
    url(r'^admin/', include(admin.site.urls)),
)
17 18 19 20 21 22 23 24 25

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

    # Auth pages
    url(r'^login$', 'login', {'template_name' : 'login.html'},
        name='website_login'),
    url(r'^logout$', 'logout', {'next_page' : '/'},
        name='website_logout'),
)