Fixing STATIC_FORMS_ROOT search path
This commit is contained in:
parent
440163e504
commit
77713d81b0
3 changed files with 9 additions and 3 deletions
|
@ -18,7 +18,7 @@ class PDFFormFillerEditor(View):
|
|||
def load_poppler_doc(self, filename):
|
||||
from django.conf import settings
|
||||
|
||||
pdf_path = os.path.abspath(os.path.join(settings.STATIC_FORMS_ROOT, filename))
|
||||
pdf_path = os.path.abspath(os.path.join(getattr(settings, 'STATIC_FORMS_ROOT', ''), filename))
|
||||
if os.path.isfile(pdf_path):
|
||||
return poppler.document_new_from_file('file://' + pdf_path, password=None)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue