Answer the question
In order to leave comments, you need to log in
How to set gunicorn to show django admin?
Made the settings as indicated in this instruction https://www.8host.com/blog/razrabotka-django-prilo...
Stuck at this point:
"Note: Since Gunicorn does not know where the static content for the admin interface is located, the interface will be displayed without styling.
To pass a module to the Gunicorn server, you need to specify the path to the directory of the wsgi.py file, which is the entry point to the application. Inside this file is the application function, which is used to communicate with the application."
And in general, after all these settings, the admin panel is not shown (
Answer the question
In order to leave comments, you need to log in
Make settings.py like this:
STATIC_URL = '/django/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATICFILES_DIRS = (
os.path.join(BASE_DIR,"main", "static"),
)
location /django/static/ {
alias /srv/webapp/django-test/current/source/static/;
autoindex on;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question