Image not loading

30 views
Skip to first unread message

Joseph Emeka

unread,
Sep 19, 2019, 10:21:07 AM9/19/19
to Django users
The highlighted section of the code is not loading the image was the solution
help.PNG

King Strips

unread,
Sep 19, 2019, 10:32:14 AM9/19/19
to django...@googlegroups.com
<div class=img style="background-image:{% url() %}; border: 3px;"></div>

On Thu, Sep 19, 2019 at 2:20 PM Joseph Emeka <amasia...@gmail.com> wrote:
The highlighted section of the code is not loading the image was the solution

--
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/c00e4b4c-f270-4180-b072-951a92283882%40googlegroups.com.

Joseph Emeka

unread,
Sep 19, 2019, 11:10:56 AM9/19/19
to Django users
Thanks for you reply I do not really understand it. i bought the template to use the layout for a project, using django framework. the css, js and other files ares was written by the designer. Secondly i have run necessary terminal command to collect assets and setting for for static files. find attached the template head


On Thursday, September 19, 2019 at 3:32:14 PM UTC+1, King Strips wrote:
<div class=img style="background-image:{% url() %}; border: 3px;"></div>

On Thu, Sep 19, 2019 at 2:20 PM Joseph Emeka <amasia...@gmail.com> wrote:
The highlighted section of the code is not loading the image was the solution

--
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...@googlegroups.com.
image.PNG

Tosin Ayoola

unread,
Sep 19, 2019, 11:20:58 AM9/19/19
to django...@googlegroups.com
I don't know if I'm write on but u're not referencing the source of the image wit the arc attribute,  but rather u using the style attribute 

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/63e40e60-7273-4897-995b-067a229e686a%40googlegroups.com.

Joseph Emeka

unread,
Sep 20, 2019, 4:23:30 AM9/20/19
to Django users
How do i reference the the source correctly?


On Thursday, September 19, 2019 at 4:20:58 PM UTC+1, Tosin Ayoola wrote:
I don't know if I'm write on but u're not referencing the source of the image wit the arc attribute,  but rather u using the style attribute 
On Sep 19, 2019 16:11, "Joseph Emeka" <amasia...@gmail.com> wrote:
Thanks for you reply I do not really understand it. i bought the template to use the layout for a project, using django framework. the css, js and other files ares was written by the designer. Secondly i have run necessary terminal command to collect assets and setting for for static files. find attached the template head

On Thursday, September 19, 2019 at 3:32:14 PM UTC+1, King Strips wrote:
<div class=img style="background-image:{% url() %}; border: 3px;"></div>

On Thu, Sep 19, 2019 at 2:20 PM Joseph Emeka <amasia...@gmail.com> wrote:
The highlighted section of the code is not loading the image was the solution

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c00e4b4c-f270-4180-b072-951a92283882%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...@googlegroups.com.

onyilimba martins mclaren tochukwu

unread,
Sep 20, 2019, 6:17:19 AM9/20/19
to Django users
Is any of the static files coming through?

Tosin Ayoola

unread,
Sep 20, 2019, 10:08:21 AM9/20/19
to django...@googlegroups.com
The remaining on template are the working perfectly,  a better way to troubleshoot this is to use your browser developer tools(network, console) ➕  have u tried img src="static file path"  instead of img style="..."

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/f82ebe60-053e-4f08-aba0-cd420efe4b09%40googlegroups.com.

Joseph Emeka

unread,
Sep 20, 2019, 10:21:48 AM9/20/19
to Django users
img src="" paths work but the style="" does ot work. Like i said i did not design the template

parmeshwar deharkar

unread,
Sep 20, 2019, 11:47:49 AM9/20/19
to django...@googlegroups.com
Url(‘ ‘) pass the string

On Thu, 19 Sep 2019 at 7:50 PM, Joseph Emeka <amasia...@gmail.com> wrote:
The highlighted section of the code is not loading the image was the solution

--
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.

Obodoma Uzondu Vincent

unread,
Sep 20, 2019, 12:20:19 PM9/20/19
to django...@googlegroups.com
use this format : style = "background-image: url ( ' {{ STATIC_URL}} images/about.jpg' )" . use this pattern to link the static files.

On Thu, Sep 19, 2019 at 7:20 AM Joseph Emeka <amasia...@gmail.com> wrote:
The highlighted section of the code is not loading the image was the solution

--

Badal Raina

unread,
Sep 20, 2019, 4:37:15 PM9/20/19
to django...@googlegroups.com
{% load 'static' %}

At top of your html page.

B. Raina


Reply all
Reply to author
Forward
0 new messages