This project is implementation for the following topics related to technologies used with Django
--Implemented Complete Auth Using Django All Auth @https://django-allauth.readthedocs.io/en/latest/installation.html.
-Implemented Crud Operations with Django Forms
-Deployed on Hostinger VPS
Available at: https://owl-eyes.arpansahu.me/
admin login details:-- email: admin@arpansahu.me username: admin 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
Installing Heroku Cli
checkout: 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
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 release-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=