Fix in settings when importing from string.
This commit is contained in:
parent
7715be7d9e
commit
b659dd95d3
1 changed files with 2 additions and 2 deletions
|
@ -92,10 +92,10 @@ def get(name, import_str=False):
|
||||||
try:
|
try:
|
||||||
value = getattr(default_settings, name)
|
value = getattr(default_settings, name)
|
||||||
value = getattr(settings, name)
|
value = getattr(settings, name)
|
||||||
if import_str:
|
|
||||||
value = import_from_str(value)
|
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
if value == None:
|
if value == None:
|
||||||
raise Exception('You must set ' + name + ' in your settings.')
|
raise Exception('You must set ' + name + ' in your settings.')
|
||||||
|
|
||||||
|
value = import_from_str(value) if import_str else value
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
Loading…
Reference in a new issue