If you Facing static file issue in your Django project.
You should use Base_Dir include OS



*STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')STATICFILES_DIRS = [    
os.path.join(BASE_DIR, 'static'), *

Because you run the Project Locally.
I hope this will help you 
On Monday, 31 March 2025 at 00:44:32 UTC+5 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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-users/03af6144-c04f-419f-aa36-e54792628aa1n%40googlegroups.com.

Reply via email to