Django doesn't reflect changes made to in production

I successfully got my Django application my server. However, I realized that I accidentally left DEBUG=True in my file. I tried setting DEBUG=False in the file, but the website won’t reflect that change. I also tried doing sudo service nginx restart but that didn’t put the change on the website. What do I need to do to get the change in effect?

As an additional note, I followed the tutorial below to get my project into production.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @leebr1

When doing changing to the project, restarting Nginx doesn’t do a lot, since Nginx is just proxying data between the visitor and Gunicorn, so restart Gunicorn instead:

sudo systemctl restart gunicorn

This comment has been deleted