After the tutorials I was looking over the source code for the djangoproject.com
site.  

(1) in djangoproject.com/apps/blog/urls/blog.py I see:

from django.conf.urls.defaults import *

info_dict = {
    'app_label': 'blog',
    'module_name': 'entries',
    'date_field': 'pub_date',
}

urlpatterns = patterns('django.views.generic.date_based',
   (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>\w+)/$', 
'object_detail', dict(info_dict,
 slug_field='slug')),
   (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/$', 'archive_day', 
info_dict),
   (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/$', 'archive_month', info_dict),
   (r'^(?P<year>\d{4})/$', 'archive_year', info_dict),
   (r'^/?$', 'archive_index', info_dict),
)


(2) And in djangoproject.com/templates/blog/ are the files:

entries_archive.html            entries_archive_month.html      
entries_detail.html
entries_archive_day.html        entries_archive_year.html


I see how "archive_day" (or month or year) gets converted to
"entries_archive_day", but I have no clue how / why / when
"object_detail" gets converted to "entries_detail".  For consistency I
would expect to see just "detail" in urlpatterns and THAT gets the
module_name prepended, but I don't see how the "object" part gets
dropped but the "archive" part doesn't.   ???

-- 
Glenn

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to