Django: Check if settings variable is set Django: Check if settings variable is set python python

Django: Check if settings variable is set


It seemed you've made it the correct way: import setting object and check.

And you can try to use:

if hasattr(settings, 'ANOTHER_VARIABLE'):

instead of:

if settings.is_defined('ANOTHER_VARIABLE'):

I found the documentation, hope this might help.