Skip to content

Commit 5c20acb

Browse files
Merge pull request #602 from Manjusri-A/patch-1
Update manage.py
2 parents d0b22db + 8d66d0a commit 5c20acb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Ecommerce Website/manage.py

+7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
#!/usr/bin/env python
22
"""Django's command-line utility for administrative tasks."""
3+
34
import os
45
import sys
56

67

78
def 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

2127
if __name__ == '__main__':
2228
main()
29+

0 commit comments

Comments
 (0)