django setup in windows

To set up Django on Windows, follow these steps:

  1. Install Python: Download the latest version of Python from the official Python website (https://www.python.org/downloads/windows/) and run the installer. Make sure to check the box that says "Add Python to PATH" during installation.

  2. Open Command Prompt: Press the Windows key and search for "Command Prompt" or "CMD." Open the Command Prompt application.

  3. Install Django: In the Command Prompt, type the following command and press Enter: pip install django

  4. Verify Installation: To ensure Django is installed correctly, type the following command and press Enter: django-admin --version

  5. Create a Django Project: To create a new Django project, navigate to the directory where you want to create the project using the cd command. Then, run the following command: django-admin startproject projectname Replace "projectname" with the desired name for your project.

  6. Start the Development Server: Change into the project directory by using the cd command. Then, run the following command to start the development server: python manage.py runserver

  7. Access the Django Admin Panel: Open your web browser and go to http://localhost:8000 to access the Django admin panel.

That's it! You have successfully set up Django on Windows. You can now start building your Django web applications.