Posts

Showing posts from April, 2021

Deploy Django Project to Heroku

  Deploy Django Project to Heroku Video Tutorial:  https://youtu.be/_3AKAdHUY1M Create Heroku Account :  https://www.heroku.com/ Download and Install Git :  https://git-scm.com/downloads Download and Install Heroku CLI :  https://devcenter.heroku.com/articles/heroku-cli#download-and-install Open Terminal Login into Heroku CLI. Run below command it will open Browser then Click on Login heroku login Create Repo for Project git init Add All Files to Repo git add . Commit All Changes git commit - m "any comment" Create an App using Dashboard or Shell (I am creating using Shell) heroku create heroku_app_name Set Repo heroku git : remote - a heroku_app_name Install gunicorn or waitress - This will be our production server as we can not use development server which we were using by runing python manage.py runserver. Waitress is meant to be a production-quality pure-Python WSGI server with very acceptable performance. For More:  https://docs...

JWT auth is not working on apache server

First of all, set up Django with apache with this      https://gulshan1996.blogspot.com/2020/08/set-up-django-with-apache.html If your  JWT auth is not working on apache server,  This is because of Apache block the header So you have to enable them by, adding this line in apache conf file WSGIPassAuthorization On WSGIScriptAlias / /home/farmafeed/manageFarmafeed/farmafeedProject/wsgi.py <Directory /home/farmafeed/manageFarmafeed> Order allow,deny Allow from all </Directory> Note:    /home/farmafeed/manageFarmafeed/farmafeedProject    this is my URL Just Add WSGIPassAuthorization On && <Directory /home/farmafeed/manageFarmafeed> Order allow,deny Allow from all </Directory>