> problem in using the address stored in imagefield
you should describe your problem a little better!
But I guess the URL is not working?
You shouldn’t use STATIC_URL but MEDIA_URL for the prefix in your template.
STATIC_URL is for static files, that don’t change like CSS and JS.
MEDIA_URL is for user uploads, like a photo in your news entry.
On Jun 13, 2011, at 5:57 PM, Pankaj Singh wrote:yes even in get_image_url it will bereturn os.path.join(settings.MEDIA_URL, 'news', self.image.name.split('/')[-1])
3) All that will be stored in your database is a path to the file (relative to MEDIA_ROOT). You'll most likely want to use the convenience url function provided by Django. For example, if your ImageField is called mug_shot, you can get the absolute path to your image in a template with {{ object.mug_shot.url }}.