This post shows how to customize your Django website’s 404 (not found) page. If the resource doesn’t exist, Django displays the standard 404 page in production mode (DEBUG = False). Django invokes a specific view that is added to handle 404 failures when the Http404 exception is raised in a view. Django’s handler404 view by […]
Configure NGINX to Run Django App in a Sub Path
Sometimes we need to run our Django project in sub path of parent URL ( www.yourmainurl.com/yourproject ) and when I have this situation I researched a lot and finally found my solution. Here I have tried to solve your problem. In this post we will learn how to configure NGINX to run your Django project. […]
Setup Crontab in Django Project
The crontab could be a list of commands simply need to run on a regular schedule, and also the name of the command used to manage that list. cron is the system process which will automatically perform tasks for you according to a set schedule. The schedule is called the crontab, which is also the name of the program used to edit […]
Upload image into custom folder in Django
Today we are going to upload image using django model. We’re going to create a small project where we can implement Django’s file upload, save and view functions, with a database but where the images will be stored on a hard drive. We assuming that you already configured your project. If you want to know […]
Setup Your First Django Project
Today we are going to create our first django project. We’ll assume you have Python Installed already. If not, you can see our this post Python Installation . The venv module provides support for creating lightweight “virtual environments” with their own site directories, optionally isolated from system site directories. Each virtual environment has its own Python binary […]
Type Error: decode() got unexpected keyword argument ‘verify’
This error is usually comes when we use PyJWT library in our django project for API. Because TokenBackend.decode passes arbitrary kwargs to jwt.decode, this is caused by jpadilla/pyjwt#657 (which is now forbidden). (Temporary) fix is to pin PyJWT with pyjwt<2.2 in your requirements.txt. Note: If your project hosted with AWS Lightsail may be you need to […]