Also I would suggest that you log exception in case you don't want to raise
it. That way you know that something goes wrong.
12.8.2017 18.52 "Fellipe Henrique" kirjoitti:
> Thanks, but.. it's weird I tried that before, and show me the error, but,
> only text.. not that "yellow page" from django
Thanks, but.. it's weird I tried that before, and show me the error, but,
only text.. not that "yellow page" from django...
I'll look again my code...
Thanks again!
T.·.F.·.A.·. S+F
*Fellipe Henrique P. Soares*
e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge'
*F
> Hello,
>
> i have these code, for example:
>
> try:
>x = parse_date('')
> 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-rai
from django.conf import settings
try:
x = parse_date('')
except TypeError:
if settings.DEBUG:
raise
else:
return False
On Sat, Aug 12, 2017 at 10:54 AM, Fellipe Henrique
wrote:
> Hello,
>
> i have these code, for example:
>
> try:
>x = parse_date('')
> except TypeErr
You can reraise exception simply by calling "raise" without params.
12.8.2017 17.54 "Fellipe Henrique" kirjoitti:
> Hello,
>
> i have these code, for example:
>
> try:
>x = parse_date('')
> except TypeError:
> return False
>
>
>
> It's ok for me code like these.. but, when DEBUG ==
Hello,
i have these code, for example:
try:
x = parse_date('')
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
T.·.F.·.A.·. S+F
*Fellipe Henrique P. Soares*
e-
6 matches
Mail list logo