From 8d66d0a1737e2b12d7ca0d267d9becf0daa46b25 Mon Sep 17 00:00:00 2001 From: Manjusri Arumugam Date: Fri, 18 Oct 2024 18:39:30 +0530 Subject: [PATCH] Update manage.py --- Ecommerce Website/manage.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Ecommerce Website/manage.py b/Ecommerce Website/manage.py index af097c6a2..a514d2290 100644 --- a/Ecommerce Website/manage.py +++ b/Ecommerce Website/manage.py @@ -1,13 +1,17 @@ #!/usr/bin/env python """Django's command-line utility for administrative tasks.""" + import os import sys def main(): """Run administrative tasks.""" + # Set the default settings module for the Django project os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ecommerceproject.settings') + try: + # Import and execute Django's command-line management utility from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( @@ -15,8 +19,11 @@ def main(): "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) from exc + + # Execute the command line utility with the provided arguments execute_from_command_line(sys.argv) if __name__ == '__main__': main() +