Python Tutorial 1 (हिंदी) - Login, Register and Logout in Python Django with PostgreSQL Database

Chirags Tutorial
Chirags Tutorial
26 بار بازدید - 4 هفته پیش - Step by step documentation in
Step by step documentation in below link:
https://www.chirags.in/tutorial/index...

[email protected]    Chirag's Python Tutorial   https://www.chirags.in
*********************************************************************************************
Login, Register and Logout in Python Django with PostgreSQL Database in हिन्दी
***********************************************************************************************
-- download and install python --
https://www.python.org/downloads/
and install the "python-3.12.3-amd64.exe" file

1. Setting up Django Project
Assuming you have already created a Django project, ensure that you have the necessary apps installed:

pip install django

2. Creating a Django App
Create a new Django app for handling authentication:

django-admin startproject chirags_project
cd chirags_project
python manage.py startapp accounts

And now open your project in text editor like vscode, sublime etc.

3. Configuring Django Settings
Add the newly created app and required authentication settings in your project's settings.py:


DATABASES = {
   'default': {
       'ENGINE': 'django.db.backends.postgresql',
       'NAME': 'LoginRegisterLogout',
       'USER': 'postgres',
       'PASSWORD': 'admin@123',
       'HOST': 'localhost',
   }
}


settings.py

INSTALLED_APPS = [
   ...
   'accounts',
]

Authentication settings
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/'

................................................
................................................

12. Run Migrations
Run migrations to apply changes to the database:

python manage.py makemigrations
python manage.py migrate

10. Run the Development Server
Start the development server:

python manage.py runserver

Visit
http://127.0.0.1:8000/accounts/register/
http://127.0.0.1:8000/accounts/login/
and
http://127.0.0.1:8000/accounts/logout/

to test your register, login, and logout functionality.

This is a basic example, and you may wish to customize it according to your project's requirements. This may involve adding features such as user profiles, password reset functionality, and more.

Note : Flow the Process shown in video.
😉Subscribe and like for more videos:
@chiragstutorial
💛Don't forget to, 💘Follow, 💝Like, 💖Share 💙&, Comment

Tutorial Link:
https://www.chirags.in/tutorials/pyth...

Thanks & Regards,
Chitt Ranjan Mahto "Chirag"
_____________________________________________________________________
Note: All scripts used in this demo will be available in our website.
Link will be available in description.


#login
#python
#chiragsPythonTutorial
#LoginRegisterLogoutinPython
#django
#djangoproject
#djangoframework
#sqlserver
#sqlservermanagementstudio
#sql_server
#sqlservertutorial
#chiragstutorial
#databasetutorial
#sqlqueries
#sqldba
#database
#databasemanagement
#chiragstutorial
#chirags
#createdatabaseinmysql
#DBATutorial
#DBATutorialLearning
#DBAEducation
#DBATutorialFree
#DatabaseTutorial
#SQLServerDatabaseTutorial
#SQLServerDBATutorial
#MicrosoftSQLServerDatabaseTutorial
#ChiragsDBATutorial
#ChiragsDatabaseTutorial
#ChiragsSQLServerDatabaseTutorial
#ChiragsSQLServerDBATutorial
#Chirags.inSQLServerDBATutorial
#ChiragsMicrosoftSQLServerDatabaseTutorial
#CreateDatabaseinSQLServer
#CreateDatabasewithT-SQL
4 هفته پیش در تاریخ 1403/03/14 منتشر شده است.
26 بـار بازدید شده
... بیشتر