mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
This was causing many problems with the installation and was only needed for the packaged version in pypi. See #277 for more details
21 lines
540 B
Python
Executable File
21 lines
540 B
Python
Executable File
#!/usr/bin/env python
|
|
import sys
|
|
|
|
from django.core.management import execute_from_command_line
|
|
|
|
from tasks import (
|
|
setup_django_environment,
|
|
get_user_config_path
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
|
|
# If user passed the settings flag ignore the default wger settings
|
|
if not any('--settings' in s for s in sys.argv):
|
|
setup_django_environment(get_user_config_path('wger', 'settings.py'))
|
|
|
|
# Alternative to above
|
|
# os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
|
|
|
|
execute_from_command_line(sys.argv)
|