Le 22 oct. 2012 à 15:13, Dae_James <daeda...@126.com> a écrit : > I use ImageField(with upload_to = 'photos') to receive user-uploaded images. > And in my template, I want to use <img src="{{ object.image.url }}" />(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.
Moreover, images will relate to the MEDIA_* Static are really meant to be static, ie they won't change as long as you don't update your project/applications. Media are where other files should go. Whether they are uploaded user documents or application generated ones, they should go there. For moreinformation have a look there: https://docs.djangoproject.com/en/1.4/ref/models/fields/#django.db.models.FileField And especially the part after: "Using a FileField or an ImageField (see below) in a model takes a few steps:" Regards, Xavier Ordoquy, Linovia. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.