24👍
An HTTP 304 response means “I don’t need to fetch it again, since it hasn’t changed since I got it last”. So if that’s the response code you got, you may not have a problem at all. Or did you mean 404 (not found)?
In any event, you normally don’t serve static files with Django directly; you do it through your front-end server. On Heroku, they have a special app and setup to help with that. You can read about it at: https://devcenter.heroku.com/articles/django-assets.
Also: you accidentally posted your SECRET_KEY in your message here. Please change that value to something else before you deploy or your site could have a serious security vulnerability. Keep that secret key a secret.
2👍
This could potentially be an issue when you do
{% load static %}
and then {% static 'css/bootstrap.min.css' %}
.
When you call {% load static %}
it does it for you so you only need to specify the link to the static file you want dropping out the static nested within the href statement.
- Django TimeField Model without seconds
- Processing a Django UploadedFile as UTF-8 with universal newlines
2👍
I had the same problem with favicon.png, just force browsers to update the cache by adding a GET parameter:
<link rel="shortcut icon" type="image/png" href="{% static 'favicon.png' %}?ver=2"/>
- How can I hide a django label in a custom django form?
- Django order items by two fields, but ignoring them if they're zero
1👍
I have the same problem cuz I use {% load static %} 2-time in base.html and product.html(extent form base.html) so i remove {% load static %} form product.html and i fix problem
- Django: logging only for my project's apps
- Django forms give: Select a valid choice. That choice is not one of the available choices
- No module named backends.default.urls