Advertisement
Mochinov

Untitled

Jul 2nd, 2021
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. #!/usr/bin/env python
  2. """Django's command-line utility for administrative tasks."""
  3. import os
  4. import sys
  5.  
  6. DEBUG = True
  7.  
  8.  
  9. def main():
  10. if DEBUG:
  11. os.environ.setdefault('DJANGO_SETTINGS_MODULE',
  12. 'Doctor_at_home_team.local_settings')
  13. else:
  14. os.environ.setdefault('DJANGO_SETTINGS_MODULE',
  15. 'Doctor_at_home_team.settings')
  16. try:
  17. from django.core.management import execute_from_command_line
  18. except ImportError as exc:
  19. raise ImportError(
  20. "Couldn't import Django. Are you sure it's installed and "
  21. "available on your PYTHONPATH environment variable? Did you "
  22. "forget to activate a virtual environment?"
  23. ) from exc
  24. execute_from_command_line(sys.argv)
  25.  
  26.  
  27. if __name__ == '__main__':
  28. main()
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement