Monday, August 3, 2020

Re: load static in css file

This may not work as intended if the CSS files are not rendered using the Django template engine. You have to put the style declaration where you'd need the image in the <style></style> tag in your template code. From there you can use the {% static "images/imag.png" %} syntax.
On Friday, July 31, 2020 at 5:58:48 PM UTC+6 Chander shekhar wrote:
tried this buddy yet it is not working

Regards
Chander Shekhar
(bestcsp)


On Thu, Jul 30, 2020 at 6:11 PM Irfan Khan <irfa...@gmail.com> wrote:
{% static 'imag.jpg' %}   instead of this try

{% static "images/imag.png" %}

On Thu, 30 Jul 2020 at 6:07 PM, Chander shekhar <best...@gmail.com> wrote:
I am unable to fetch images from css file .
I have used {% load static %}
{% static 'imag.jpg' %}
buti can't fetch.console is saying image not found.

--
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/554cbaf1-3b94-40b4-a0f1-efe0bd3f24ceo%40googlegroups.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...@googlegroups.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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f0e45bd1-68ca-405f-a033-c808d6da53d5n%40googlegroups.com.

No comments:

Post a Comment