I have some custom functions in model classes which processes some data, 
and add custom attribute to the model. Thing is, I do not know how could I 
raise an exception if this functions that are accessed when the template is 
generated (the error seems to be only silent, so it will process the 
template further but gives NO ERROR )

In the template
    {{ entry.state }}

In the model:

    @property
    def state(self):
        somedict = {'a': 111}
        try:
           print somedict['b']
        except Exception as e:
           FATAL_ERROR

What should I put in the place of fatal_error so that the template 
processing should stop immediatelly, or gives some exception to the render 
function ? 
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to