Skip to content
/ geek_glasses Public template

Implmented Custom Django User Auth Model and its Manager and performed basic login/reg/forget password

Notifications You must be signed in to change notification settings

arpansahu/geek_glasses

Repository files navigation

Geek Glasses | Django Custom Auth User Model from AbstractBaseUser

This project is implementation for the following topics related to technologies used with Django

-Implemented Complete Auth Using Custom Auth Model.

  1. Used built in AbstractBaseUser as parent Auth Model
  2. Build Custom Manager for the same
  3. Implemented custom error View for customizing Templates
  4. Login. SingUp, Logout, Account Views Implemented
  5. In built views of PasswordChangeDoneView, PasswordChangeView, PasswordResetCompleteView, PasswordResetConfirmView, PasswordResetView, PasswordResetCompleteView
  6. Build Custom Templates for These Inbuilt Views
  7. Reset Password is working
  8. If kyc is False then it will show you Get Kyc Details unless it will welcome you. By default, every user is non kyc-ied.
  9. If you want to kyc a person login to admin panel from here: https://django-custom-auth-model.herokuapp.com/admin/ and modify it

-Deployed on Heroku

  1. Used Heroku Postgres

Tech Stack

Python Django HTML5 CSS3 Bootstrap Javascript Postgres Heroku Github

Demo

Available at: https://django-project-api-crud-graphq.herokuapp.com/

admin login details:-- email: admin@arpansahu.me password: showmecode

License

MIT

Installation

Installing Pre requisites

  pip install -r requirements.txt

Making Migrations and Migrating them.

  python manage.py makemigrations
  python manage.py migrate

Creating Super User

  python manage.py createsuperuser

Run Server

  python manage.py runserver

Tech Stack

Client: HTML, Jinja, CSS, BootStrap

Server: Django, Gunicorn, Heroku

Deployment on Heroku

Installing Heroku Cli from : https://devcenter.heroku.com/articles/heroku-cli Create your account in Heroku.

Inside your project directory

Login Heroku CLI

  heroku login

Create Heroku App

  heroku create [app_name]

Push Heroku App

    git push heroku master

Configure Heroku App Env Variables

  heroku config:set GITHUB_USERNAME=joesmith

Configuring Django App for Heroku

Install whitenoise

pip install whitenoise 

Include it in Middlewares.

MIDDLEWARE = [
    # ...
    "django.middleware.security.SecurityMiddleware",
    "whitenoise.middleware.WhiteNoiseMiddleware",
    # ...
]

Create Procfile and include this code snippet in it.

release: ./release-tasks.sh
web: gunicorn djangoProject.wsgi

Create release-task.sh for running multilple commands in run: section of procfile

python manage.py makemigrations
python manage.py migrate

Make relase-task.sh executable

chmod +x release-tasks.sh 

Documentation

Python Django HTML5 CSS3 Bootstrap Javascript Postgres Heroku Github

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

SECRET_KEY=

DEBUG=

DB_HOST=

DB_NAME=

DB_USER=

DB_PASSWORD=

DB_PORT=

EMAIL_USER=

EMAIL_PASS=

ALLOWED_HOSTS=

About

Implmented Custom Django User Auth Model and its Manager and performed basic login/reg/forget password

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published