nothingness
nothingness

Reputation: 1031

why won't my if elif statement work for my django production environment?

I'm trying to set up a local and a production settings for my django project I've tried this

from .my_pass import LOCAL

from .base import *


if LOCAL == 'local':
    from .local import *

elif not LOCAL == 'production':
    from .production import *

and it wont work. If I do this

example.com/.,mnwnci

it shows all my debug information. How can I fix that? so that in development I see the debug info and in production I don't

Upvotes: 0

Views: 84

Answers (1)

noteness
noteness

Reputation: 2520

You are using elif not LOCAL == 'production' there, which i guess is wrong, because you have to import from production if LOCAL == 'production', right? Then change the elif not LOCAL == 'production' to elif LOCAL == 'production'

Upvotes: 2

Related Questions