views:

101

answers:

1

I am hoping to use an imagefield in one of my Django models, and therefore created a very simple model, adjusted my settings file, uploaded the imagefield by adding the image from within the Admin application. Unhappily, the link attached to the image field in the Admin application does not provide the stored image, no matter what I try using for MEDIA_URL. What am I missing?

I'm using Django 1.1 with the Development Server. PIL installed just fine.

My want my image to be stored in /Users/judy/Sites/images/testphoto.

I use upload_to = 'testphoto' when defining the field in the model

I use the following settings:

MEDIA_ROOT = '/Users/judy/Sites/images/'
MEDIA_URL = ????????? - I've tried quite a variety!!!!!!!!!
ADMIN_MEDIA_PREFIX = '/media/'
A: 

Read the documentation on serving images.

Daniel Roseman
Done. And it works! Thanks for the pointer.
Judith Boonstra
@Judith Boonstra: You should accept the answer then to mark it as solved.
Felix Kling