Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

srivastavaanurag79/django-userauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Django Authenticating and Signing up users

This projects aims to provide a example of Django project with bootstrap 4 version of the templates for the user registration and authentication views. We shall be able to use it as plain email based registration alone or along with social authentication.

This project uses the following amazing projects from the opensource:

  • django-allauth (gives social authentication abilities and covers all the major user registration usecases.)
  • django-anymail (gives ability to send emails via any famous email service provider.)
  • django-bootstrap4 (gives bootstrap4 UI for the django forms)
  • placeholder-pics (generating profile pictures based on name/email)
  • django-thumbs-v2 (generating thumbnails of the profile pictures)

The project covers

  • all the user registrations use cases by django-allauth (all the templates uses bootstrap4 UI )
  • custom user profile model (one to one relation with User model).
  • user profile settings pages
    • update user information,
    • de-activate/re-activate user[TODO]
  • email backend service(django-anymail) email templates (django-allauth) to work with registration flow

Screenshots

Homepage

homepage

Login Page

Login

Signup Page

Signup

Password reset page

password reset

User Profile page

user profile

Installation

Use the package manager pip to install the requirements.

  • open terminal
  • Change to the directory of the project and install the requirements.txt
pip3 install -r requirements.txt

Usage

  • Open terminal, change to the directory of the project ,i.e, /webapp

  • Migrate the Tables from database

python3 manage.py makemigrations
python3 manage.py migrate
  • create a superuser to become an admin
python3 manage.py createsuperuser
  • run the web app
python3 manage.py runserver

Once the application is launched, homepage will be displayed:

  • Click on Signup to register a user.
  • After signing up you will be asked to confirm your email, since this is a development project you can see the link in your terminal to confirm your email, click on that link you will be redirected to the confirmation page.
  • Once you are confirmed click on Login page to log into the webapp.
  • Once you are logged inside you can update your profile.
  • If you forget your password you can reset it too.
  • You have an option to login with your social accounts too.