Files
watersurf-erp/manage.py

17 lines
625 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env python
"""Точка входа для управляющих команд Django."""
import os
import sys
if __name__ == "__main__":
base = os.path.dirname(os.path.abspath(__file__))
app_dir = os.path.join(base, "app")
if app_dir not in sys.path:
sys.path.insert(0, app_dir)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError("Не удалось импортировать Django.") from exc
execute_from_command_line(sys.argv)