Commit 915c26fc authored by Jorrit Schaap's avatar Jorrit Schaap

TMSS-154: use proper default import path

parent 5b8747a2
......@@ -15,13 +15,13 @@ def subscribe_to_signals():
signal.signal(s, signal_handler)
if __name__ == "__main__":
def main():
# do subscribe to more signals than django does for proper exits during testing
if os.environ.get('TMSS_RAISE_ON_SIGNALS', "False").lower() in ["true", "1", "on"]:
subscribe_to_signals()
# normal django startup. Specify the DJANGO_SETTINGS_MODULE, and run it.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tmss.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lofar.sas.tmss.tmss.settings")
try:
from django.core.management import execute_from_command_line
......@@ -32,3 +32,6 @@ if __name__ == "__main__":
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == "__main__":
main()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment