Hi.
My web site has been deployed on IIS Server (Window Server 2019)
I got trouble with missing CSS including other static files on Django Admin page.
The content below describes what I have done.
1. This is my admin page that cannot load any css files at all.
I
For admin section . I use my customized base_site.html in order for changing logo. it is located in
projdec_folder\app\templates\admin as figure below. I don’t know exactly where it is relevant to this problem or not
'Cause I deployed another django project to IIS sevrer without applying customr admin tempate , admin page work well (not issue about static file loading like this case.)
2. More interestingly, every my custom page can load the whole static file completely.
Additionally, If i run with python manage.py runserver http://127.0.0.1:8000/
Admin section is okay, it can be loaded static file/ css perfectly
Below are just my detail and structure in my project. it would be useful to investigate problem.
this is my setting in settings.py , are there any more steps to configure toward this file?
My project folder has 2 locations that contain static folder and web.config as figure shown in below.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<clear />
<add name="StaticFile"
path="*"
verb="*"
modules="StaticFileModule"
resourceType="File"
requireAccess="Read" />
</handlers>
</system.webServer>
</configuration>
Lastly, I ran the command collectionstatic and add Virtual Directory in order to enable serving static files map a static alias to the static directory already.
the picture show below.
I try to iis reset but nothing better,
I don’t know how to fix this issue.
Anyone can suggest me.
Thank you