manage.py 774 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
  3. # Copyright: (c) <spug.dev@gmail.com>
  4. # Released under the AGPL-3.0 License.
  5. """Django's command-line utility for administrative tasks."""
  6. import os
  7. import sys
  8. def main():
  9. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'spug.settings')
  10. try:
  11. from django.core.management import execute_from_command_line
  12. except ImportError as exc:
  13. raise ImportError(
  14. "Couldn't import Django. Are you sure it's installed and "
  15. "available on your PYTHONPATH environment variable? Did you "
  16. "forget to activate a virtual environment?"
  17. ) from exc
  18. execute_from_command_line(sys.argv)
  19. if __name__ == '__main__':
  20. main()