Changeset View
Changeset View
Standalone View
Standalone View
manage.py
- This file was moved from tests/manage.py.
| #!/usr/bin/env python | #!/usr/bin/env python | ||||
| """Django's command-line utility for administrative tasks.""" | """Django's command-line utility for administrative tasks.""" | ||||
| import os | import os | ||||
| import sys | import sys | ||||
| def main() -> None: | def main() -> None: | ||||
| os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings') | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'looper_example_project.settings') | ||||
| try: | try: | ||||
| from django.core.management import execute_from_command_line | from django.core.management import execute_from_command_line | ||||
| except ImportError as exc: | except ImportError as exc: | ||||
| raise ImportError( | raise ImportError( | ||||
| "Couldn't import Django. Are you sure it's installed and " | "Couldn't import Django. Are you sure it's installed and " | ||||
| "available on your PYTHONPATH environment variable? Did you " | "available on your PYTHONPATH environment variable? Did you " | ||||
| "forget to activate a virtual environment?" | "forget to activate a virtual environment?" | ||||
| ) from exc | ) from exc | ||||
| execute_from_command_line(sys.argv) | execute_from_command_line(sys.argv) | ||||
| if __name__ == '__main__': | if __name__ == '__main__': | ||||
| main() | main() | ||||