your is set to True, (but it is not! it clearly reads: Debug = False)

November 2, 2019 148 views

I have my django installed properly with all the gunicorn, nginx and systemd collaborating with each other, I can see the Congratulations page you have successfully installed django etc. Yet, it says that my debug at file is set to True, which is not.

Also I have created a hello world page at and and it says page not found. when I go
I am inside my virtualenvironment because it is there where I installed everything, of course.

from django.http import HttpResponse

def home(request):
return HttpResponse(‘hello’)

and the

from django.contrib import admin
from django.urls import path
from myapp import views

urlpatterns = [
path('home/’,views.home, name='home’),

  • Clean browser cache

  • i know about that and tested it under 4 different browsers, browsers that had never been to the site. no change.
    Besides, even if I had been using a browser locked on its cache, that would not impede accessing a newly created page like /home

1 Answer

I found the answer on Stackoverflow

As a note for others: I had the same problem; I configured my production website on a VM with gunicorn and nginx, following the tutorial for ubuntu 16.04 from the digital ocean documentation.

I wasn’t able to turn off the debug mode, even when restarting the nginx systemd’s service: the solution was to restart also the gunicorn service:

systemctl restart nginx gunicorn

Have another answer? Share your knowledge.