You have a problem here
{% static '/css/base.css' %}

the correct is
    {% static 'css/base.css' %}

Also is a bad idea set media folder in static.
take a look here https://docs.djangoproject.com/en/3.1/howto/static-files/




El mié., 14 oct. 2020 a las 23:05, Farai M (<[email protected]>)
escribió:

> Why have the media url if it's point to the same dir as static .Your can
> just specific it's separately in it's own dir as /media/ and have /static/
> .You are also missing a static root there .
>
> On Wed, Oct 14, 2020, 5:05 PM Chelsea Fan <[email protected]>
> wrote:
>
>> MEDIA_URL = '/images/'
>> MEDIA_ROOT = BASE_DIR / 'static/images'
>>
>>
>> On Wed, Oct 14, 2020 at 2:12 PM Anh Nguyen <[email protected]> wrote:
>>
>>> where is your STATIC_ROOT ?
>>>
>>>
>>> On Wed, Oct 14, 2020 at 5:43 PM Chelsea Fan <
>>> [email protected]> wrote:
>>>
>>>> hello everyone, I have an issue, I can't connect css style to my
>>>> template, but I can upload images and see it , here is my code,  please
>>>> help me, thanks  for attentions !!!
>>>>
>>>> STATIC_URL = '/static/'
>>>> STATICFILES_DIR = [BASE_DIR / 'static']
>>>>
>>>> {% load static %}
>>>> <!DOCTYPE html>
>>>> <html lang="en" dir="ltr">
>>>> <head>
>>>>     <meta charset="utf-8">
>>>>     <link rel="stylesheet" href="{% static '/css/base.css' %}">
>>>>
>>>> [image: image.png]
>>>>
>>>> --
>>>> 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 on the web visit
>>>> https://groups.google.com/d/msgid/django-users/CAJwZndd_SYaToM%3D6h1KL-WmXs7eR3e0sgwHqVPPFwo%3Dx2HW5xg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAJwZndd_SYaToM%3D6h1KL-WmXs7eR3e0sgwHqVPPFwo%3Dx2HW5xg%40mail.gmail.com?utm_medium=email&utm_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 [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAKaoNbTN2-hiy71RS8H8i_wc9XeQqJBOLkR%3DOjEJxocorO1FRw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAKaoNbTN2-hiy71RS8H8i_wc9XeQqJBOLkR%3DOjEJxocorO1FRw%40mail.gmail.com?utm_medium=email&utm_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 [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAJwZnde%3D8xOePMK5L%2B9YvXtnW_U%2BHCpX2VVq5R%2BmQDZz39kBrQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAJwZnde%3D8xOePMK5L%2B9YvXtnW_U%2BHCpX2VVq5R%2BmQDZz39kBrQ%40mail.gmail.com?utm_medium=email&utm_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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMeub5PM26mY%2BDpB-xK0NorWxXOE1qahL-zf2WJrFirqeGL73A%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMeub5PM26mY%2BDpB-xK0NorWxXOE1qahL-zf2WJrFirqeGL73A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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 on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyN%3DaboOu1c4h9OuaYac1UJeRkrSe7nRXrSHY65EZfuYAA%40mail.gmail.com.

Reply via email to