Django Template Integration

Django Authentication System

so guys in this Blog I explain about Django authenticate system .

✔✔✔

it is very common and required to have a user authentication system to deal with users management and offer resources based on identity. Web Developers can implement authentication system by their own but here two points must be considered, first, implementing a secure authentication system is challenging and a flaw can lead to huge damage; second, the authentication system remains very similar in its implementation, hence following DRY principle (Don’t Repeat Yourself) it is not wise to reinvent the wheel. So, most of the web framework offers a module for authentication i.e. expert developers of framework implement the authentication system once and further any developer can use the module to implement and customized authentication in their web application.

  1. Create a new project (Web application)
  2. Add a new app to project (a module)
  3. Add authentication to your application

Create a new project (Web application)

a) Project folder

  1. Create a project Folder
  2. Move to Project folder
  3. open CMD in that project Folder
“Open Cmd “

in CMD

create virtual environment

  1. python -m venv myvenv

activate the Virtual environment

  1. myvenv\scripts\activate

Django Install

  1. pip install django

Create a Project

  1. Django-admin startproject projectname .

Create app

  1. python manage.py startapp appname

Runserver

  1. python manage.py runserver 8001

Open project folder in VS CODE

2. CREATE A HOME PAGE OF THE PROJECT

After creating the app, we have to add this to installed_apps sections of settings.py.

in setting.py

b.) Creating templates

(home.html)

home.html

c.)Create a view for the app (/views.py)

view.py

d.)Create urls.py and add the route

url.py

So now we have to write a url for project

Project url.py

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store