STATICFILES_DIRS = [
BASE_DIR / 'static_files', # or whatever directory contains your static files]
If that doesn't work, share your urls.py
Maybe it worked for a small project because you have DEBUG = False in that case.
Let me know if this worked!
Hugo
Maybe it worked for a small project because you have DEBUG = False in that case.
Let me know if this worked!
Hugo
On Sunday, March 30, 2025 at 4:44:32 PM UTC-3 Szawunia wrote:
Hi everybody,I have problem with my static files in my Django project, running local. Actually Django-Oscar, but settings files is Django. There are not founded (404 error). I have all my static files in my project directory (where 'manage.py' is).My settings:STATIC_URL = 'static/'
STATIC_ROOT = BASE_DIR / 'static'
In my templates:
{% load static %}
<link href="{% static "main.css" %}" rel="stylesheet">
<link rel="shortcut icon" href="{% static "logo3.gif" %}" />
I stuck with that problem. Earlier in my Django simple project, all was ok. So my settings should be right.
Any help will be appreaciate. Or any idea how to check, in simple way, what is wrong with my static loading
With all the best
Ewa
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/django-users/af12ddc1-70c5-4a4c-9b68-8ff7c5947c07n%40googlegroups.com.
No comments:
Post a Comment