Skip to content
Snippets Groups Projects
Commit 4186dfc1 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch '373-relative-imports-fail-when-__main__-is-not-called-correctly' into 'master'

Resolve "Relative imports fail when __main__ is not called correctly"

Closes #373

See merge request !484
parents 3e2f3389 77ed43d8
No related branches found
No related tags found
1 merge request!484Resolve "Relative imports fail when __main__ is not called correctly"
Pipeline #5817 passed
......@@ -3,13 +3,14 @@
import os
import sys
import django.__main__
from django.core.management import execute_from_command_line
def aleksis_cmd():
"""Run django-admin command with correct settings path."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "aleksis.core.settings")
sys.argv[0] = os.path.dirname(__file__)
sys.argv[0] = django.__main__.__file__
execute_from_command_line(sys.argv)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment