Re: Upload image in own form

2008-08-21 Thread Robvdl
Thank you very much, this worked perfectly. --~--~-~--~~~---~--~~ 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

Re: Upload image in own form

2008-08-20 Thread Julien Phalip
Hi, I think that you need to set the form's object instance when collecting the POST data too: form = WrestlerProfileForm(request.POST, request.FILES, instance=profile) That way, the image will be set with the existing one, and the form won't complain when validating. Hope it helps, Julien O

Upload image in own form

2008-08-20 Thread Robvdl
I've got a model with an ImageField in it: image = models.ImageField(upload_to='images/wrestlers', help_text='...') I can upload images no problem using the Admin app. I wish to upload images in my own Django app, so I created a form: class WrestlerProfileForm(forms.ModelForm): class Meta: