File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
"""Django's command-line utility for administrative tasks."""
3
+
3
4
import os
4
5
import sys
5
6
6
7
7
8
def main ():
8
9
"""Run administrative tasks."""
10
+ # Set the default settings module for the Django project
9
11
os .environ .setdefault ('DJANGO_SETTINGS_MODULE' , 'ecommerceproject.settings' )
12
+
10
13
try :
14
+ # Import and execute Django's command-line management utility
11
15
from django .core .management import execute_from_command_line
12
16
except ImportError as exc :
13
17
raise ImportError (
14
18
"Couldn't import Django. Are you sure it's installed and "
15
19
"available on your PYTHONPATH environment variable? Did you "
16
20
"forget to activate a virtual environment?"
17
21
) from exc
22
+
23
+ # Execute the command line utility with the provided arguments
18
24
execute_from_command_line (sys .argv )
19
25
20
26
21
27
if __name__ == '__main__' :
22
28
main ()
29
+
You can’t perform that action at this time.
0 commit comments