On Tue, Feb 21, 2006 at 09:22:25PM -0000, Jan Rademaker wrote: > The 'archive_day' you see in urlpatterns is the name of the view, eg. > django.views.generic.date_based.archive_day and not some string that's > appended to the module's name.
Thanks... for some reason, I had the perception that the urlpatterns specified the template not the view. Knowing it's the view I went to the source code and now understand. It's amazing how one reads things when you have an incorrect perception to begin with :-) Perhaps that might need to be more clear in the docs? > The default template names for date > based views happen to be the same as the name of the corresponding > view. The default template name for the object_detail view is > <module_name>_detail, so in this case entries_detail. > > See > http://www.djangoproject.com/documentation/generic_views/#using-date-based-generic-views Except that it's not IN the docs... :-) At least, searching for "_detail" did not show any such explanation. The docs for archive_<day|month|year> all have a line like: "Uses the template app_label/module_name_archive_day by default." but the description of object_detail (for both date_based and list_based) does not have anything to say how the template name is derived. On a related note... I find it a bit confusing to see something like "module_name_archive_day" to mean (in my syntax) "<module_name>_archive_day" (i.e. the contents of the variable named "module_name" will be followed by the string "_archive_day"). What with so many things taking 'variables' and strings and combining them, I would suggest SOME demarcation in the docs when using the name of a variable in a string along with other characters. For me, placing a variable name between <...> is clear since that doesn't show up as real text, but something is really needed for clarity. In part, this did add to my misunderstandings. -- 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 -~----------~----~----~----~------~----~------~--~---