inconsistency in django

when wanting to access the django admin page it appears like this

This is almost definitely caused by your browser cacheing a CSS file that it has loaded from a different site.

See the discussions at:

and the ticket at #27572 (Static files served in development should prevent caching) – Django for a different approach.

ce paramettre est désactiver
Capture1

I think I understand the problem, but I don’t know how to solve it. I deployed the application via Apache using wsgi. so I put the project in the htdocs folder. suddenly he no longer sees the static admin folder

Ok, so this is a deployment issue, not a development issue.

  • What is your STATIC_ROOT setting?

  • Did you run collectstatic?

  • What is your Apache configuration for the directory identified by STATIC_ROOT?

  • Does Apache have permission to that directory?

  • What do you have in your access log and error log for these requests?

Side note: There is no need or value in having your project code itself reside within htdocs. Apache does not need to (and shouldn’t) serve files directly from your project code directory structure.

See How to deploy static files | Django documentation | Django and then How to use Django with Apache and mod_wsgi | Django documentation | Django

in my settings file I don’t have a STATIC_ROOT variable. here is the content of my files


In addition to the two references in my previous response, you’ll probably want to go through the entire section of the docs starting with How to deploy Django | Django documentation | Django, including the Deployment checklist | Django documentation | Django

Deploying a Django project into a production-quality environment is probably the most intricate and confusing thing you will ever do with Django - primarily because so little of it has anything to do with Django itself.