UPDATE!
If I raise some other error inside the python code (e.g. ValueError)
it's not suppressed.
Seems a design error in Django. Will carry on this discussion
somewhere else.

On 21 Oct, 14:05, Peter Bengtsson <pete...@gmail.com> wrote:
> Suppose I've got this code:
>
> # template.html
> Info: {{ article_instance.count_words }} words
>
> # models.py
> class Article(models.Model):
>    text = models.TextField()
>    def count_words(self):
>         raise AttributeError('debugging')
>
> Then, when I render that page I get:
> Info:  words
>
> When I want is a raised proper error so that I can spot the possible
> bug in my system. How do I do that?
>
> If what you look up in the template doesn't exist I can accept that
> Django, currently, prefers to just suppress it but I'm here talking
> about things that are found but yields an exception upon executing.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to