2
0

manage.py 850 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env python
  2. import os
  3. import sys
  4. import warnings
  5. warnings.filterwarnings("ignore")
  6. if __name__ == "__main__":
  7. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.dev")
  8. try:
  9. from django.core.management import execute_from_command_line
  10. except ImportError:
  11. # The above import may fail for some other reason. Ensure that the
  12. # issue is really that Django is missing to avoid masking other
  13. # exceptions on Python 2.
  14. try:
  15. import django
  16. except ImportError:
  17. raise ImportError(
  18. "Couldn't import Django. Are you sure it's installed and "
  19. "available on your PYTHONPATH environment variable? Did you "
  20. "forget to activate a virtual environment?"
  21. )
  22. raise
  23. execute_from_command_line(sys.argv)