File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22"""Django's command-line utility for administrative tasks."""
3+
34import os
45import sys
56
67
78def main ():
89 """Run administrative tasks."""
10+ # Set the default settings module for the Django project
911 os .environ .setdefault ('DJANGO_SETTINGS_MODULE' , 'ecommerceproject.settings' )
12+
1013 try :
14+ # Import and execute Django's command-line management utility
1115 from django .core .management import execute_from_command_line
1216 except ImportError as exc :
1317 raise ImportError (
1418 "Couldn't import Django. Are you sure it's installed and "
1519 "available on your PYTHONPATH environment variable? Did you "
1620 "forget to activate a virtual environment?"
1721 ) from exc
22+
23+ # Execute the command line utility with the provided arguments
1824 execute_from_command_line (sys .argv )
1925
2026
2127if __name__ == '__main__' :
2228 main ()
29+
You can’t perform that action at this time.
0 commit comments