Thursday, April 30, 2015

What's the better way to get settings.DEBUG in a view?


I have one view, and I want to get de DEBUG value..

if I try these:

import settings

if settings.DEBUG:


from settings import DEBUG


show me these error:

File "", line 19, in <module>
    import settings
  File "", line 178, in <module>
    from .settings_local import *
SystemError: Parent module '' not loaded, cannot perform relative import

So, what's the better way to get these value?


T.·.F.·.A.·.     S+F
Fellipe Henrique P. Soares

e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge'
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
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment