Fix import of Django settings (#41)
Settings in Django are imported as such, see https://docs.djangoproject.com/en/1.10/topics/settings/#using-settings-in-python-codepull/43/head
parent
e6ad15af79
commit
6cc4abbaa8
|
@ -1,8 +1,8 @@
|
||||||
STRICT = True
|
STRICT = True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from django.conf import django_settings
|
from django.conf import settings
|
||||||
STRICT = getattr(django_settings, 'PDF_MINER_IS_STRICT', STRICT)
|
STRICT = getattr(settings, 'PDF_MINER_IS_STRICT', STRICT)
|
||||||
except Exception:
|
except Exception:
|
||||||
# in case it's not a django project
|
# in case it's not a django project
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue