On Mon, 2007-04-30 at 17:23 +0100, Christian Markwart Hoeppner wrote:
> Hi there!
> 
> Just a check. When printing a form with the as_ul() method, isn't the
> help_text property of each field wrapped by any tag? Even if it's just a
> span with or without some class, it would provide a useful hook for the
> ones feeling more designer than coder. And also for the lazy coders like
> me :D

This is the type of question that could be answered by looking at the
source: django/newforms/forms.py (search for "def as_ul").

You can see it isn't wrapped in any special way, but it's also trivial
to create your own method that presents the text however, you like. You
could even call your custom method (in your Form subclass) as_ul(), so
that you don't need to change any of your code.

The presentation methods (as_ul, as_table, as_p, etc) in the Form class
are purely convenience method and cannot hope to be perfect for the
needs of everybody. They are designed to be overridden, since they are
just a format string with a bunch of variables substituted in.

Regards,
Malcolm



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

Reply via email to