0% found this document useful (0 votes)
160 views1 page

Django Basic Commands

The document outlines the basic commands for setting up and running a Django project, starting with creating a virtual environment and installing Django. It includes commands for creating a new project and app, as well as instructions for running the Django development server. The document emphasizes using Visual Studio Code for editing the project files.

Uploaded by

gowtham266272
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views1 page

Django Basic Commands

The document outlines the basic commands for setting up and running a Django project, starting with creating a virtual environment and installing Django. It includes commands for creating a new project and app, as well as instructions for running the Django development server. The document emphasizes using Visual Studio Code for editing the project files.

Uploaded by

gowtham266272
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Django Basic Commands

Monday, August 12, 2024 12:15 PM

To download Django, first create VIRTUAL ENVIRONMENT,

⚫ Command to create virtual environment


python -m venv myenv

⚫ After creating/downloading virtual environment, activate the virtual environment


myenv\scripts\activate

⚫ Now install Django


pip install django

⚫ After Downloading, to work with project, create one project with the command
django-admin startproject project_name

⚫ After creating project folder, change the directory from actual folder to project folder
cd project1

⚫ Now open any editor (prefer visual studio)


code . (opens visual studio)

Now VS code got opened, you can see the project path to work

Django provides inbuilt server it hosts on localhost with port number 8000

To run the server follow some steps,


Open terminal >> select new terminal >> default powershell will be opened, change it to cmd by
clicking on + icon and select command prompt in it

⚫ Command to run server


python [Link] runserver

⚫ Command to create app


python [Link] startapp app_name

New Section 1 Page 1

You might also like