Hi all,
I'm having some debugging issue with Django templating and newforms.
I'm using a form_for_model class, and I define a custom layout method,
in the vein of as_ul or as_table).
It looks like :
EntryForm = forms.form_for_model(models.Entry, form = CustomForm)
class CustomForm(forms.BaseForm):
def as_custom(self):
"""custom layout"""
...
# Error on purpose
assert 1 == 0
return "<div>..."
Now, if I call {{entry_form.as_custom}} in my template, the more I can
get for debugging is TEMPLATE_STRING_IF_INVALID, but there is no way
Django tells me what is going wrong (in my case AssetionError at
line ...).
Am I missing something ? Some obscure setting maybe ;o) ?
I understand it's Django philosophy not to raise any error, but a
debugging trace, maybe in the server console, would be nice.
Cheers,
Olivier
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---