On 28 jan, 23:05, Margie <margierogin...@yahoo.com> wrote: > Is there a way to generate debug output from the template language? > Suppose I have something like this: > > {% for field in form %} > <tr><td>{{ field.label_tag }}</td><td>{{ field }}</td></ > tr> > {% if field.help_text %}<tr><td colspan="2"><span> > {{ field.help_text }}</span></td></tr>{% endif %} > {% endfor %} > > Suppose I want to know what attributes are available for 'field'. Any > way to introspect field from within the template language and get the > output sent to either the stderr/stdout of the server or to a file?
Why do you want to do it from the template language ? 'form' was passed from a view (which is ordinary Python code), so why not inspect it from whithin the view ? Using the dev server and pdb, it's pretty trivial... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---