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
- [Django]-How to redirect to the same page after an action in django
- [Django]-How to redirect "print" command output to a file without changing the python code?
Source:stackexchange.com