mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
Create settings now uses the current path per default, which simplifies the initial project setup
26 lines
550 B
Python
26 lines
550 B
Python
#!/usr/bin/env python
|
|
|
|
# Standard Library
|
|
import sys
|
|
|
|
# Django
|
|
from django.core.management import execute_from_command_line
|
|
|
|
# wger
|
|
from wger.tasks import (
|
|
get_path,
|
|
setup_django_environment
|
|
)
|
|
|
|
|
|
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_path('settings.py'))
|
|
|
|
# Alternative to above
|
|
# os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
|
|
|
|
execute_from_command_line(sys.argv)
|