carom-server/manage.py

23 lines
667 B
Python
Raw Permalink Normal View History

2021-10-24 10:33:26 +02:00
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
2017-01-03 18:57:11 +01:00
import os
import sys
2021-10-24 10:33:26 +02:00
def main():
"""Run administrative tasks."""
2021-10-24 11:05:54 +02:00
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'caromserver.settings')
2017-01-03 18:57:11 +01:00
try:
from django.core.management import execute_from_command_line
2021-10-24 10:33:26 +02:00
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
2017-01-03 18:57:11 +01:00
execute_from_command_line(sys.argv)
2021-10-24 10:33:26 +02:00
if __name__ == '__main__':
main()