Answer the question
In order to leave comments, you need to log in
How to set correct path to Django admin styles on production server?
After python manage.py collectstatic they appear in the /static/static/admin/css folder , but the admin itself tries to find them in /static/admin/css
setting.py
root = lambda *dirs: join(abspath(BASE_DIR), *dirs)
STATIC_ROOT = root("static","static")
STATIC_URL = "/static/"
# Additional locations of static files
STATICFILES_DIRS = [
root("static"),
root("media")
]
STATICFILES_FINDERS = [
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
]
Answer the question
In order to leave comments, you need to log in
You need to configure the web server to return static from the folder where this static is located.
STATIC_URL tells the browser to look for statics at the URL '/static/'.
So configure the web server so that it sends files from the folder where they are at this URL.
Everything is written here:
https://docs.djangoproject.com/en/1.11/howto/dep...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question