I set background image like below in the style tag of the html page. It works !
<style> body{ background: url({% static 'users/img/bg/name_of _image.png'%}) no-repeat center center fixed; -webkit-background-size:cover; -moz--background-size:cover; -o--background-size:cover; background-size: cover; } </style> On Fri, Jul 17, 2020 at 4:38 AM sunday honesty <honesty202...@gmail.com> wrote: > Hi django users, pls help me with this: > > In case we supply background image via the url() function as > background-image: url("some_path/image.png") > > How do we do this in django static files? > I tried > > url("{% static 'some_path/image.png' %}") > > but it didn't work, how do I do this pls? > > -- > 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/c711150b-910c-4cbb-9823-48e0657fe352o%40googlegroups.com > . > -- Thanks & Regards! Sujata S. Aghor -- 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/CAJCP8KCtHz%2BUqqU6ez57ELfT5ouHTrDRzbvPVYKYMcv3EUV1Mw%40mail.gmail.com.