Sith/manage.py

35 lines
988 B
Python
Raw Normal View History

2015-11-18 09:44:06 +01:00
#!/usr/bin/env python3
#
# Copyright 2023 © AE UTBM
# ae@utbm.fr / ae.info@utbm.fr
#
# This file is part of the website of the UTBM Student Association (AE UTBM),
# https://ae.utbm.fr.
#
# You can find the source code of the website at https://github.com/ae-utbm/sith
#
# LICENSED UNDER THE GNU GENERAL PUBLIC LICENSE VERSION 3 (GPLv3)
2024-09-23 10:25:27 +02:00
# SEE : https://raw.githubusercontent.com/ae-utbm/sith/master/LICENSE
# OR WITHIN THE LOCAL FILE "LICENSE"
#
#
2015-11-18 09:44:06 +01:00
import os
import sys
from django.utils.autoreload import DJANGO_AUTORELOAD_ENV
2025-02-20 18:38:15 +01:00
from sith.composer import start_composer, stop_composer
from sith.settings import PROCFILE_RUNSERVER
2015-11-18 09:44:06 +01:00
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sith.settings")
from django.core.management import execute_from_command_line
2025-02-20 18:38:15 +01:00
if os.environ.get(DJANGO_AUTORELOAD_ENV) is None and PROCFILE_RUNSERVER is not None:
start_composer(PROCFILE_RUNSERVER)
2015-11-18 09:44:06 +01:00
execute_from_command_line(sys.argv)
stop_composer()