/urls.py

http://django-jchat.googlecode.com/ · Python · 28 lines · 12 code · 6 blank · 10 comment · 0 complexity · 8624a0e5cd0e1f329ee049d81f18d17b MD5 · raw file

  1. from django.conf.urls.defaults import *
  2. import settings
  3. from views import index, simple, complex
  4. # Uncomment the next two lines to enable the admin:
  5. # from django.contrib import admin
  6. # admin.autodiscover()
  7. urlpatterns = patterns('',
  8. # Example:
  9. # (r'^django_jchat/', include('django_jchat.foo.urls')),
  10. # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
  11. # to INSTALLED_APPS to enable admin documentation:
  12. # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
  13. # Uncomment the next line to enable the admin:
  14. # (r'^admin/(.*)', admin.site.root),
  15. (r'^$', index),
  16. (r'^simple$', simple),
  17. (r'^complex/(?P<id>\d)$', complex),
  18. (r'^chat/', include('jchat.urls')),
  19. (r'^accounts/login/', 'django.contrib.auth.views.login', {'template_name':'login.html'}),
  20. (r'^static/(?P<path>.*)$', 'django.views.static.serve',
  21. {'document_root': settings.MEDIA_ROOT}),
  22. )