Guest User

Untitled

a guest
May 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. from django.conf.urls.defaults import *
  2. from coltrane.models import Entry
  3. from django.views.generic import list_detail
  4.  
  5. # Uncomment the next two lines to enable the admin:
  6. from django.contrib import admin
  7. admin.autodiscover()
  8.  
  9. entry_info_dict = {
  10. 'queryset': Entry.objects.all(),
  11. 'date_field': 'pub_date',
  12. "template_object_name" : "entry",
  13. }
  14.  
  15. urlpatterns = patterns('',
  16. # Example:
  17. # (r'^cms/', include('cms.foo.urls')),
  18.  
  19. # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
  20. # to INSTALLED_APPS to enable admin documentation:
  21. # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
  22.  
  23. # Uncomment the next line to enable the admin:
  24.  
  25. (r'^admin/', include(admin.site.urls)),
  26. (r'^tiny_mce/(?P<path>.*)$', 'django.views.static.serve',
  27. { 'document_root': 'C:/tinymce/jscripts/tiny_mce/' }),
  28. (r'^search/$', 'cms.search.views.search'),
  29. (r'^weblog/$', 'django.views.generic.date_based.archive_index',
  30. entry_info_dict),
  31. (r'^weblog/(?P<year>\d{4})/$',
  32. 'django.views.generic.date_based.archive_year',
  33. entry_info_dict),
  34. (r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/$',
  35. 'django.views.generic.date_based.archive_month',
  36. entry_info_dict),
  37. (r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$',
  38. 'django.views.generic.date_based.archive_day',
  39. entry_info_dict),
  40. (r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
  41. 'django.views.generic.date_based.object_detail',
  42. entry_info_dict),
  43. (r'', include('django.contrib.flatpages.urls')),
  44. )
Add Comment
Please, Sign In to add comment