Re: My page cound not load image, help!

2012-10-22 Thread Xavier Ordoquy
Le 22 oct. 2012 à 15:13, Dae_James a écrit : > I use ImageField(with upload_to = 'photos') to receive user-uploaded images. > And in my template, I want to use (image > is the object of ImageField) to display them. However, images can't be > displayed. I think it's not

Re: My page cound not load image, help!

2012-10-22 Thread Dae_James
I use *ImageField*(with upload_to = 'photos') to receive user-uploaded images. And in my template, I want to use **(image is the object of ImageField) to display them. However, images can't be displayed. I think it's not about static files. If it is, what's the use of ImageField's url property.

Re: My page cound not load image, help!

2012-10-22 Thread Amyth Arora
Serve the image as a static file. in your settings.py file set the following: STATIC_URL = '/static/' STATICFILES_DIRS = ('/path/to/your/image/directory',) # Without a trailing slash and then load your image as On Mon, Oct 22, 2012 at 5:14 PM, Joel Goldstick wrote:

Re: My page cound not load image, help!

2012-10-22 Thread Joel Goldstick
On Mon, Oct 22, 2012 at 6:00 AM, Dae James wrote: > The returned html code by my app is : > The "image.jpg" file is in "project_dir/photos/" directory. PS: project_dir > is my django project's root directory. > > So why the image could not be loaded. Please help~ > Thank you~ >

My page cound not load image, help!

2012-10-22 Thread Dae James
The returned html code by my app is : The "image.jpg" file is in "project_dir/photos/" directory. PS: project_dir is my django project's root directory. So why the image could not be loaded. Please help~ Thank you~ Dae James -- You received this message because you are subscribed to the