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
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
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:
3 matches
Mail list logo