mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
ignore the django import check
This commit is contained in:
parent
8b34ea3066
commit
65f3c3fce4
@ -6,17 +6,17 @@ if __name__ == "__main__":
|
|||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "InvenTree.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "InvenTree.settings")
|
||||||
try:
|
try:
|
||||||
from django.core.management import execute_from_command_line
|
from django.core.management import execute_from_command_line
|
||||||
except ImportError:
|
except ImportError: # pragma: no cover
|
||||||
# The above import may fail for some other reason. Ensure that the
|
# The above import may fail for some other reason. Ensure that the
|
||||||
# issue is really that Django is missing to avoid masking other
|
# issue is really that Django is missing to avoid masking other
|
||||||
# exceptions on Python 2.
|
# exceptions on Python 2.
|
||||||
try:
|
try: # pragma: no cover
|
||||||
import django # NOQA
|
import django # pragma: no cover
|
||||||
except ImportError:
|
except ImportError: # pragma: no cover
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"Couldn't import Django. Are you sure it's installed and "
|
"Couldn't import Django. Are you sure it's installed and "
|
||||||
"available on your PYTHONPATH environment variable? Did you "
|
"available on your PYTHONPATH environment variable? Did you "
|
||||||
"forget to activate a virtual environment?"
|
"forget to activate a virtual environment?"
|
||||||
)
|
) # pragma: no cover
|
||||||
raise
|
raise # pragma: no cover
|
||||||
execute_from_command_line(sys.argv)
|
execute_from_command_line(sys.argv)
|
||||||
|
Loading…
Reference in New Issue
Block a user