django setup in windows
To set up Django on Windows, follow these steps:
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.
Open Command Prompt: Press the Windows key and search for "Command Prompt" or "CMD." Open the Command Prompt application.
Install Django: In the Command Prompt, type the following command and press Enter:
pip install django
Verify Installation: To ensure Django is installed correctly, type the following command and press Enter:
django-admin --version
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.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
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.