Re: DRY templates

2005-11-22 Thread Bryan Murdock
On 11/15/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On Nov 15, 2005, at 5:09 PM, oggie rob wrote: > > But when I get to the > > template, no scalable option is obvious. I would expect something > > like: > > (% for field in form.fields %) > [snip] > > As of revision [1253] this is now po

Re: DRY templates

2005-11-17 Thread Pedro Furtado
> You're correct: FormField classes have no knowledge of model objects. > All they know about is the basics for displaying a form. If you want > to pass the verbose_name of a model object, you'll need to create some > sort of custom data structure and pass it to your template. Thanks -- Pedro Fu

Re: DRY templates

2005-11-17 Thread Adrian Holovaty
On 11/17/05, Pedro Furtado <[EMAIL PROTECTED]> wrote: > How can I get the verbose_name of the field? > > {{ field.verbose_name }} doesn't work. Checked the source and it seams > FormField class and its widgets only provides the field_name. You're correct: FormField classes have no knowledge of mo

Re: DRY templates

2005-11-17 Thread Pedro Furtado
2005/11/15, oggie rob <[EMAIL PROTECTED]>: > > Holy moly! That's exactly it! Thanks for the change - I had been > looking for a while and my head was starting to swim! > How can I get the verbose_name of the field? {{ field.verbose_name }} doesn't work. Checked the source and it seams FormField

Re: DRY templates

2005-11-15 Thread oggie rob
Holy moly! That's exactly it! Thanks for the change - I had been looking for a while and my head was starting to swim!

Re: DRY templates

2005-11-15 Thread Jacob Kaplan-Moss
On Nov 15, 2005, at 5:09 PM, oggie rob wrote: But when I get to the template, no scalable option is obvious. I would expect something like: (% for field in form.fields %) [snip] As of revision [1253] this is now possible. Enjoy! Jacob