5👍
✅
I believe the template engine is doing what you are asking it to do.
href="{{STATIC_URL}} /stati/css/default.css"
correctly translates to
/static/ /stati/css/default.css
Try
href="{{STATIC_URL}}css/default.css"
in base.html if what you are after is
/static/css/default.css
Can’t account for why home.html would work correctly though.
2👍
It looks to me like you added the spaces manually to base.html
:
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}} /stati/css/defau...
<img alt="logo2:" src="{{ STATIC_URL }} /static/imag....
Take out the space before /stati/css
and /static/imag
and see if the problem goes away.
- [Django]-Django set multiple allowed hosts
- [Django]-How to allow others to connect to my Django website?
- [Django]-Add styling to django Password reset forms
0👍
space = %20. Be sure to omit space from your url…
like : <script src="{% static " js/dashboard/salesPieChart.js" %}"></script>
To: <script src="{% static "js/dashboard/salesPieChart.js" %}"></script>
- [Django]-How to get the path of the function call in Python?
- [Django]-How to send two variables with html as a JSON in Django?
Source:stackexchange.com