from django.conf import settings
try:
x = parse_date('xxxx')
except TypeError:
if settings.DEBUG:
raise
else:
return False
On Sat, Aug 12, 2017 at 10:54 AM, Fellipe Henrique <fellipeh@gmail.com> wrote:
Hello,--i have these code, for example:try: x = parse_date('xxxx') except TypeError: return FalseIt'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?RegardsT.·.F.·.A.·. S+FFellipe Henrique P. Soarese-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge'Fedora Ambassador: https://fedoraproject.org/wiki/User: Fellipeh Blog: http:www.fellipeh.eti.brGitHub: https://github.com/fellipeh Twitter: @fh_bash
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+unsubscribe@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/CAF1jwZF% .2Bf2KAZjNWA%2BjVnhTKbSj- vQQ4WjQRUzsr5vCxrqg4Eg%40mail. gmail.com
For more options, visit https://groups.google.com/d/optout .
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+unsubscribe@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/CALn3ei2t6xh3zjHBbuVC_rjZmw6csnBRQ1gxY7tX-y3741tg_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment