Coverage for tests/test_app/manage.py: 80%
15 statements
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-12 13:49 +0000
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-12 13:49 +0000
1#!/usr/bin/env python
2"""Django's command-line utility for administrative tasks."""
3import os
4import sys
5from pathlib import Path
7sys.path.append(str(Path(os.path.dirname(__file__)).parent.parent))
10def main():
11 """Run administrative tasks."""
12 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
13 try:
14 from django.core.management import execute_from_command_line
15 except ImportError as exc:
16 error_msg = (
17 "Couldn't import Django. Are you sure it's installed and "
18 "available on your PYTHONPATH environment variable? Did you "
19 "forget to activate a virtual environment?"
20 )
21 raise ImportError(error_msg) from exc
22 execute_from_command_line(sys.argv)
25if __name__ == "__main__":
26 main()