Thursday, July 31, 2014

Re: image upload

Are you using <img src="{{ image.image.url }}" >  ?

On Thursday, July 31, 2014 7:20:19 AM UTC-4, ngangsia akumbo wrote:
i have a problem of displaying my image on my web page.

i have upload my pic in admin and when i display it it shows me the  this


class Image(models.Model):
    title = models.CharField(max_length=60, blank=True, null=True)
    image = models.FileField(upload_to="images")

<div id="content">
<div id="content_plate">

<h2> {{ blogs.title }} - Date Published: {{blogs.pub_date}} </h2>
<p> {{ blogs.content|safe}} <br />Tags: {{ }}</p> 
<h2> Reported By: {{blogs.reporter}} </h2>
<div id='link_back'>
<p>Return back to Main Page</p>
<li><a href="/blog/">News</a></li>
{% endblock %}

MEDIA_ROOT = 'C:/Python27/Scripts/testproject/Django-1.4.3/django/bin/test0/images/'
MEDIA_URL = '/media/'

STATIC_URL = '/static/'

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
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment