Saturday, January 1, 2022

To create your first Django project

Requirements: Python , VSCode [Or any other code editor]

Use the following steps to create a project in Django.

  • Create a folder and open that in VSCode

  • Create virtual environment using the following command

python -m venv env

  • Here venv is the command to create the virtual environment and env is the name of the environment.

  • After that activate the environment by going into the scripts folder and use the activate command

(env):\scripts>activate

  • Once the virtual environment is active (your virtual environment name (env): indicates you are in virtual environment) then install the Django using the following command

pip install django

  • Now we can create our project using the below command

django-admin startproject project-name .

  • The (.) here indicated that it will create manage.py in the root folder else it will create one more folder inside the root with the project-name and add the manage.py file inside it.

Git Commands

Git Version   To check the git version Git -v       Git Clone To clone the repository, use the following command: Git clone [u...