> Hello,
> 
> i have these code, for example:
> 
> try:
>    x = parse_date('xxxx')
> except TypeError:
>   return False
>
​>
>
>  It's ok for me code like these.. but, when DEBUG == True, I like to show the 
> django default error page...
> 
> How can I do that?
> 
> Regards

Why not simply re-raise the exception?

from yourproject.settings import DEBUG

try:
  x = parse_date('xxxx')
except TypeError:
  if DEBUG:
    raise
  return False

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/VI1PR03MB10060FE0FF9D5AA3E8CFF7D0D98E0%40VI1PR03MB1006.eurprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to