I'm a newbie to django. I'm developing a project in django 1.3. Problem is I'm uploading a image from the admin panel
class About(models.Model):
image = models.ImageField(upload_to='about')
files = models.FileField(upload_to='about')
Here is my template tag
<img class="profile_pic" src="{{ about.image }}" />
My setting file is as below
MEDIA_ROOT = path("media/")
MEDIA_URL = '/media/'
STATIC_ROOT = ''
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
STATICFILES_DIRS = (
path('static/'),
)
I checked that image is uploaded to /media/about/image_name. Problem is it rendered in the template as "/about/imagename" but not shoing. When I manually go to that image url it showing a 404 error.