File: urls.py

package info (click to toggle)
python-django-debug-toolbar 1%3A0%2Bgit201107220111-96e46c6-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,300 kB
  • sloc: python: 3,857; makefile: 34
file content (20 lines) | stat: -rw-r--r-- 729 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from django.conf import settings
from django.conf.urls.defaults import *
from django.contrib import admin
from django.views.generic.simple import direct_to_template

admin.autodiscover()

urlpatterns = patterns('',
    (r'^$', direct_to_template, {'template': 'index.html'}),
    (r'^jquery/index/$', direct_to_template, {'template': 'jquery/index.html'}),
    (r'^mootools/index/$', direct_to_template, {'template': 'mootools/index.html'}),
    (r'^prototype/index/$', direct_to_template, {'template': 'prototype/index.html'}),
    (r'^admin/', include(admin.site.urls)),
)

if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^media/(.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT})
    )