User Authentication Based Django App
  • Python Django
  • Basic Python Virtual Environment Setup
  • Project Set Up
  • Model-View-Templates Implementation
  • Model & Django Admin Area
  • View
    • Types of Views in Django
    • Project Todo Views
  • Django Templates
  • Todo App
    • DEMO: Workflow of Todo App
    • Base Template for Todo App
    • Registration Module
    • Login Module
    • Linking Login and Registration page
    • Task List User Authentication
    • Task Reordering
    • Logout Module
    • Task Create Module
    • Task Update
    • Task Delete
Powered by GitBook
On this page

Basic Python Virtual Environment Setup

Django Project Set Up

PreviousPython DjangoNextProject Set Up

Last updated 1 year ago

  1. Choose code editor platform like Visual Studio(recommending), Sublime Text, PyCharm, Atom or Vim.

  2. Install Python 3.10 (at least)

  3. Set the Environment Path for python interpreter.

  4. Create a Folder name "Djnago Todo App with User Authentcation"

  5. Open created folder "Djnago Todo App with User Authentcation" in visual studio code.

  6. Open Terminal in vs code (ctrl + `) and change terminal from from powershell to cmd like given below (ref Fig. 1.1)

  1. using python to create a virtual environment for your project namely "pyvenv"

Type below code in your cmd prompt (ref Fig. 1.2)

py -m venv pyvenv
  1. Now activate your python virtual environment in terminal.

Type below code in your cmd prompt (ref Fig. 1.3)

call pyvenv/Scripts/activate
  1. Create "requirements.txt" file in "Djnago Todo App with User Authentcation" folder. (ref Fig. 1.5)

  1. Save the below lines in requirements.txt file.

asgiref==3.7.2
Django==4.2.9
sqlparse==0.4.4
tzdata==2023.4
  1. Install the requirements.txt using python package manager (pip) in your virtual environment (pyvenv)

Type below code in your cmd prompt (ref Fig. 1.6)

pip install -r requirements.txt
  1. Now check the requirements are successfully installed.

Type below code in your cmd prompt (ref Fig. 1.7)

pip freeze
Fig 1.1 Terminal in cmd
Fig. 1.2 Python Virtual Environment
Fig. 1.3 Activating python virtual environment.
Fig. 1.4 Creating requirements.txt in root folder.
Fig. 1.5 Collecting Requirements
Fig. 1.6 Installing Requirements.
Fig. 1.7 Checking Requirements in pyvenv