Want more features on Pastebin? Sign Up, it's FREE!
Guest

urls.py

By: a guest on Jun 18th, 2012  |  syntax: None  |  size: 0.96 KB  |  views: 28  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. from django.conf.urls.defaults import patterns, include, url
  2. from theme.views import home_t,home_c
  3. from django.conf import settings
  4. # Uncomment the next two lines to enable the admin:
  5. from django.contrib import admin
  6. admin.autodiscover()
  7.  
  8. urlpatterns = patterns('',
  9.     # Examples:
  10.         (r'^search_c/$', home_c),
  11.         (r'^search_t/$', home_t),
  12.         (r'^home/',include('theme.themes.urls')),
  13.         (r'^search_t/(?P<course_id>\d{1,5})/$', home_t),
  14.         (r'^search_c/(?P<course_id>\d{1,5})/$', home_c),
  15.         (r'^files/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT }),
  16.         (r'^search/', include('haystack.urls')),
  17.     # url(r'^$', 'theme.views.home', name='home'),
  18.     # url(r'^theme/', include('theme.foo.urls')),
  19.  
  20.     # Uncomment the admin/doc line below to enable admin documentation:
  21.     url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
  22.  
  23.     # Uncomment the next line to enable the admin:
  24.     url(r'^admin/', include(admin.site.urls)),
  25. )
clone this paste RAW Paste Data