This project is implementation for the following topics related to technologies used with Django
-Implemented Complete Auth Using Custom Auth Model.
- Used built in AbstractBaseUser as parent Auth Model
- Build Custom Manager for the same
- Implemented custom error View for customizing Templates
- Login. SingUp, Logout, Account Views Implemented
- In built views of PasswordChangeDoneView, PasswordChangeView, PasswordResetCompleteView, PasswordResetConfirmView, PasswordResetView, PasswordResetCompleteView
- Build Custom Templates for These Inbuilt Views
- Reset Password is working
- 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.
- 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
- Used Heroku Postgres
Available at: https://django-project-api-crud-graphq.herokuapp.com/
admin login details:-- email: admin@arpansahu.me password: showmecode
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
Client: HTML, Jinja, CSS, BootStrap
Server: Django, Gunicorn, 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
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=