view urls.py @ 24:2e7226e90157

Many fixes. See detailed description. - Style errors - Writer proper 404 and 500 templates - Make login page redirect back to page being viewed (still buggy?) - Provide a brief blurb about Agora - Use tables for registration and login forms (need to be styled) - Fix typos, grammatical errors. - Don't use .djhtml extension for some templates
author Jordi Gutiérrez Hermoso <jordigh@gmail.com>
date Mon, 28 Jun 2010 03:00:01 -0500
parents d9658d30b814
children 6ba969517b9c
line wrap: on
line source

from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
     (r'^$',
      'django.views.generic.simple.direct_to_template',
      {'template': 'index.djhtml'}),


     (r'^admin/doc/', include('django.contrib.admindocs.urls')),
     (r'^admin/', include(admin.site.urls)),

     (r'^accounts/logout/', 'django.contrib.auth.views.logout',
      {'template_name' : 'index.djhtml', 'next_page' : '/'}),

     (r'^accounts/', include('registration.urls')),

     (r'^', include('agora.apps.bundle.urls')),

)

#Let Django itself serve static data during debugging
from django.conf import settings

if settings.DEBUG:
     urlpatterns += patterns('',
                    (r'^static/(?P<path>.*)$', 'django.views.static.serve',
                    {'document_root': 'static/', 'show_indexes': True}),
                    )