[Django]-Errors occuring after changing mt setting to DEBUG = False

2👍

I think you need to run

python manage.py collectstatic

and set settings for static files.
Post collectstatic run you can actually see grapelli folder in your STATIC ROOT directory. Read the django docs here for more details.

Make sure you have not added

static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

to your urls under condition DEBUG == True.

0👍

Take a look at ALLOWED_HOSTS option in settings.py. You simply need to specify the allowed hosts for your website like:

ALLOWED_HOSTS=['localhost']

or the simplest, but most insecure option:

ALLOWED_HOSTS=['*']
👤Nhor

Leave a comment