To clarify, the djangobook states: << On the admin site’s edit forms, each field’s label is generated from its model field name. The algorithm is simple: Django just replaces underscores with spaces and capitalizes the first character, so, for example, the Book model’s publication_date field has the label “Publication date.” >>
Where in the django.contrib.admin code is this logic found? I would like to utilize it. On Jul 2, 4:02 pm, Technicalbard <rodwe...@gmail.com> wrote: > I'm curious how the admin creates the templates for any object in the > database... > > I'm using the object_detail generic view, but would prefer having > Django use the parameters of the object to generate the template, > rather than me having to hardcode the parameter names into the > template. > > The admin does this when you create new objects - how? The docs don't > seem to lead me to this. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---