Source

djangobook-cn / urls.py

Full commit
# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from ragendja.urlsauto import urlpatterns
from ragendja.auth.urls import urlpatterns as auth_patterns
#from djangobook.forms import UserRegistrationForm
from django.contrib import admin

admin.autodiscover()

handler500 = 'ragendja.views.server_error'

urlpatterns = patterns('',
    url(
        r'^$',
        'django.views.generic.simple.direct_to_template',
        {'template': 'main.html'},
        name = 'home',
    ),
    url(
        r'^about/$',
        'django.views.generic.simple.direct_to_template',
        #{'template': 'about.html'},
        {'template': 'main.html'},
        name = 'about',
    ),
    url(
        r'^contact/$',
        'django.views.generic.simple.direct_to_template',
        #{'template': 'contact.html'},
        {'template': 'main.html'},
        name = 'contact',
    ),
    url(
        r'^errata/$',
        'django.views.generic.simple.direct_to_template',
        #{'template': 'errata.html'},
        {'template': 'main.html'},
        name = 'errata',
    ),
    #url(
    #    r'^license/$',
    #    'django.views.generic.simple.direct_to_template',
    #    {'template': 'licenseja.html'},
    #    name = 'licenseja',
    #),
) + urlpatterns
urlpatterns = patterns('views',
    url(
        r'^license/$',
        'license',
        name = 'license',
    ),
) + urlpatterns

#urlpatterns = auth_patterns + patterns('',
    #('^admin/(.*)', admin.site.root),
    #(r'^$', 'django.views.generic.simple.direct_to_template',
    #    {'template': 'main.html'}),
    # Override the default registration form
    #url(r'^account/register/$', 'registration.views.register',
    #    kwargs={'form_class': UserRegistrationForm},
    #    name='registration_register'),
#) + urlpatterns