mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
moves imports to enable startup without django beeing loaded (#3547)
Fixes #3546
This commit is contained in:
parent
d102a87eff
commit
92fb40e8fc
@ -7,9 +7,6 @@ import shutil
|
||||
import string
|
||||
from pathlib import Path
|
||||
|
||||
from django.contrib.staticfiles.storage import StaticFilesStorage
|
||||
from django.core.files.storage import default_storage
|
||||
|
||||
import yaml
|
||||
|
||||
logger = logging.getLogger('inventree')
|
||||
@ -213,6 +210,9 @@ def get_custom_file(env_ref: str, conf_ref: str, log_ref: str, lookup_media: boo
|
||||
|
||||
Set lookup_media to True to also search in the media folder.
|
||||
"""
|
||||
from django.contrib.staticfiles.storage import StaticFilesStorage
|
||||
from django.core.files.storage import default_storage
|
||||
|
||||
value = get_setting(env_ref, conf_ref, None)
|
||||
|
||||
if not value:
|
||||
|
Loading…
Reference in New Issue
Block a user