Coverage for manage.py: 82%

11 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-09-16 07:42 +0000

1#!/usr/bin/env python 

2"""Django's command-line utility for administrative tasks.""" 

3 

4import os 

5import sys 

6 

7 

8def main(): 

9 """Run administrative tasks.""" 

10 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sample_project.settings") 

11 try: 

12 from django.core.management import execute_from_command_line 

13 except ImportError as exc: 

14 raise ImportError( 

15 "Couldn't import Django. Are you sure it's installed and " 

16 "available on your PYTHONPATH environment variable? Did you " 

17 "forget to activate a virtual environment?" 

18 ) from exc 

19 execute_from_command_line(sys.argv) 

20 

21 

22if __name__ == "__main__": 

23 main()