Re: django staticfiles problem

2020-10-15 Thread Chelsea Fan
thanks guys, I did it ))

On Thu, Oct 15, 2020 at 9:55 PM Luis Zárate  wrote:

> 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 ()
> 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 
>> wrote:
>>
>>> MEDIA_URL = '/images/'
>>> MEDIA_ROOT = BASE_DIR / 'static/images'
>>>
>>>
>>> On Wed, Oct 14, 2020 at 2:12 PM Anh Nguyen  wrote:
>>>
 where is your STATIC_ROOT ?


 On Wed, Oct 14, 2020 at 5:43 PM Chelsea Fan <
 allaberdi16yazha...@gmail.com> 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 %}
> 
> 
> 
> 
> 
>
> [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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJwZndd_SYaToM%3D6h1KL-WmXs7eR3e0sgwHqVPPFwo%3Dx2HW5xg%40mail.gmail.com
> 
> .
>
 --
 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/CAKaoNbTN2-hiy71RS8H8i_wc9XeQqJBOLkR%3DOjEJxocorO1FRw%40mail.gmail.com
 
 .

>>> --
>>> 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/CAJwZnde%3D8xOePMK5L%2B9YvXtnW_U%2BHCpX2VVq5R%2BmQDZz39kBrQ%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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/CAMeub5PM26mY%2BDpB-xK0NorWxXOE1qahL-zf2WJrFirqeGL73A%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> "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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAG%2B5VyN%3DaboOu1c4h9OuaYac1UJeRkrSe7nRXrSHY65EZfuYAA%40mail.gmail.com
> 
> .
>

-- 
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/CAJwZndcgnRocVEECN4DJnzE2JY0fa_cVSUk43TA4Xz2p07GE%3DA%40mail.gmail.com.


Re: django staticfiles problem

2020-10-15 Thread Luis Zárate
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 ()
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 
> wrote:
>
>> MEDIA_URL = '/images/'
>> MEDIA_ROOT = BASE_DIR / 'static/images'
>>
>>
>> On Wed, Oct 14, 2020 at 2:12 PM Anh Nguyen  wrote:
>>
>>> where is your STATIC_ROOT ?
>>>
>>>
>>> On Wed, Oct 14, 2020 at 5:43 PM Chelsea Fan <
>>> allaberdi16yazha...@gmail.com> 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 %}
 
 
 
 
 

 [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 django-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAJwZndd_SYaToM%3D6h1KL-WmXs7eR3e0sgwHqVPPFwo%3Dx2HW5xg%40mail.gmail.com
 
 .

>>> --
>>> 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/CAKaoNbTN2-hiy71RS8H8i_wc9XeQqJBOLkR%3DOjEJxocorO1FRw%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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/CAJwZnde%3D8xOePMK5L%2B9YvXtnW_U%2BHCpX2VVq5R%2BmQDZz39kBrQ%40mail.gmail.com
>> 
>> .
>>
> --
> 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/CAMeub5PM26mY%2BDpB-xK0NorWxXOE1qahL-zf2WJrFirqeGL73A%40mail.gmail.com
> 
> .
>


-- 
"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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyN%3DaboOu1c4h9OuaYac1UJeRkrSe7nRXrSHY65EZfuYAA%40mail.gmail.com.


Re: django staticfiles problem

2020-10-14 Thread Farai M
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 
wrote:

> MEDIA_URL = '/images/'
> MEDIA_ROOT = BASE_DIR / 'static/images'
>
>
> On Wed, Oct 14, 2020 at 2:12 PM Anh Nguyen  wrote:
>
>> where is your STATIC_ROOT ?
>>
>>
>> On Wed, Oct 14, 2020 at 5:43 PM Chelsea Fan <
>> allaberdi16yazha...@gmail.com> 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 %}
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> [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 django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAJwZndd_SYaToM%3D6h1KL-WmXs7eR3e0sgwHqVPPFwo%3Dx2HW5xg%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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/CAKaoNbTN2-hiy71RS8H8i_wc9XeQqJBOLkR%3DOjEJxocorO1FRw%40mail.gmail.com
>> 
>> .
>>
> --
> 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/CAJwZnde%3D8xOePMK5L%2B9YvXtnW_U%2BHCpX2VVq5R%2BmQDZz39kBrQ%40mail.gmail.com
> 
> .
>

-- 
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/CAMeub5PM26mY%2BDpB-xK0NorWxXOE1qahL-zf2WJrFirqeGL73A%40mail.gmail.com.


Re: django staticfiles problem

2020-10-14 Thread Chelsea Fan
MEDIA_URL = '/images/'
MEDIA_ROOT = BASE_DIR / 'static/images'


On Wed, Oct 14, 2020 at 2:12 PM Anh Nguyen  wrote:

> where is your STATIC_ROOT ?
>
>
> On Wed, Oct 14, 2020 at 5:43 PM Chelsea Fan 
> 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 %}
>> 
>> 
>> 
>> 
>> 
>>
>> [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 django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAJwZndd_SYaToM%3D6h1KL-WmXs7eR3e0sgwHqVPPFwo%3Dx2HW5xg%40mail.gmail.com
>> 
>> .
>>
> --
> 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/CAKaoNbTN2-hiy71RS8H8i_wc9XeQqJBOLkR%3DOjEJxocorO1FRw%40mail.gmail.com
> 
> .
>

-- 
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/CAJwZnde%3D8xOePMK5L%2B9YvXtnW_U%2BHCpX2VVq5R%2BmQDZz39kBrQ%40mail.gmail.com.


Re: django staticfiles problem

2020-10-14 Thread Anh Nguyen
where is your STATIC_ROOT ?


On Wed, Oct 14, 2020 at 5:43 PM Chelsea Fan 
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 %}
> 
> 
> 
> 
> 
>
> [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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJwZndd_SYaToM%3D6h1KL-WmXs7eR3e0sgwHqVPPFwo%3Dx2HW5xg%40mail.gmail.com
> 
> .
>

-- 
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/CAKaoNbTN2-hiy71RS8H8i_wc9XeQqJBOLkR%3DOjEJxocorO1FRw%40mail.gmail.com.


django staticfiles problem

2020-10-14 Thread Chelsea Fan
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 %}






[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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJwZndd_SYaToM%3D6h1KL-WmXs7eR3e0sgwHqVPPFwo%3Dx2HW5xg%40mail.gmail.com.