Re: can someone help me why my static files is not being rendered?

2023-06-16 Thread Aspersh Upadhyay
Thanks a lot to Makan Dianka and everyone who replied to my question. Your 
help was greatly appreciated. I was able to solve the problem using Makan 
Dianka's solution. 
On Friday, June 16, 2023 at 9:00:20 AM UTC+5:30 Makan Dianka wrote:

> It is :
>
> STATICFILES_DIRS=[
>  .
> ]
>
> Not :
>
> STATICFILES_DIR=[
>  .
> ]
>
> Just add S in the end of DIR like DIRS and make sur u create static folder 
> in your project root.
>
>
> Le jeu. 15 juin 2023 à 16:52, Ngaga Dancan  a 
> écrit :
>
>> Use load static first before you use extends 
>>
>>
>> On Thu, Jun 15, 2023, 16:52 Prosper Lekia  wrote:
>>
>>> Where is the Python.png located?
>>>
>>> From your code, it should be directly in your static folder not a 
>>> subfolder. So verify your file structure first. If every is in order, 
>>> confirm if whitenoise is installed, and been added to your MiddleWare.
>>>
>>> On Thu, Jun 15, 2023, 14:33 Aspersh Upadhyay  
>>> wrote:
>>>
>>>> my settings.py 
>>>>
>>>> STATIC_URL = 'static/'
>>>>
>>>> STATICFILES_DIR = [
>>>> BASE_DIR / "static"
>>>> ]
>>>>
>>>> Template where I am trying to load static files
>>>>
>>>> {% extends 'base.html' %} 
>>>> {% load static %}
>>>>
>>>> {% block title %} 
>>>>   Issue With Django static files
>>>> {%endblock title %} 
>>>> {% block body %}
>>>> 
>>>>   
>>>> >>> src="{% static 'Python.png' %}">
>>>>   
>>>> 
>>>>
>>>> terminal throwing me 404 see this 
>>>>
>>>> "GET /static/Python.png HTTP/1.1" 404 1789
>>>>
>>>> I hope here I will get my solution for this.
>>>>
>>>> -- 
>>>> 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...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/django-users/54b813cc-58f4-4cbe-80af-a427f063fbb2n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/54b813cc-58f4-4cbe-80af-a427f063fbb2n%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CALGeGE2kXEJ77bEAQY-eQA588PAJsM2ssUicpJsDrxdz8V2g_A%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/CALGeGE2kXEJ77bEAQY-eQA588PAJsM2ssUicpJsDrxdz8V2g_A%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> -- 
>> 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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAAzh8pK%3DxH0GTm2MdLi1bwD%3DU8u%3D9z5MEf3os1qBNyVzWKCtvg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CAAzh8pK%3DxH0GTm2MdLi1bwD%3DU8u%3D9z5MEf3os1qBNyVzWKCtvg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f566de2b-7eca-425a-899d-1615bba77eafn%40googlegroups.com.


can someone help me why my static files is not being rendered?

2023-06-15 Thread Aspersh Upadhyay
my settings.py 

STATIC_URL = 'static/'

STATICFILES_DIR = [
BASE_DIR / "static"
]

Template where I am trying to load static files

{% extends 'base.html' %} 
{% load static %}

{% block title %} 
  Issue With Django static files
{%endblock title %} 
{% block body %}

  

  


terminal throwing me 404 see this 

"GET /static/Python.png HTTP/1.1" 404 1789

I hope here I will get my solution for this.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54b813cc-58f4-4cbe-80af-a427f063fbb2n%40googlegroups.com.