Re: how can I change(update) an existing avatar to a new one?

2009-04-01 Thread TTear1943
Thank you for you reply. Now I have slove the problem. But the solution is very strange. In fact, there is a clean function in my update form, as following: def clean_user_avatar(self): if not self.cleaned_data["user_avatar"]: raise forms.ValidationError("Image Path is in n

Re: how can I change(update) an existing avatar to a new one?

2009-04-01 Thread Karen Tracey
2009/4/1 TTear1943 <1943@gmail.com> > > I seems it doesnot work when update an ImageField. > Certainly ImageFields can be updated. You've omitted from the code you posted what exactly is done by the function user.handle_upload_user_avatar(), which is my first guess as to where the problem is

Re: how can I change(update) an existing avatar to a new one?

2009-04-01 Thread TTear1943
I seems it doesnot work when update an ImageField. On 4月1日, 下午5时37分, TTear1943 <1943@gmail.com> wrote: > Hi, I encounter a problem. > In my user models there is an atrrbution: user.avatar = ImageField > ('avatar', upload_to=AVATAR_TEMP_DIR, blank=True, null=True) > then i use a modelform as a

how can I change(update) an existing avatar to a new one?

2009-04-01 Thread TTear1943
Hi, I encounter a problem. In my user models there is an atrrbution: user.avatar = ImageField ('avatar', upload_to=AVATAR_TEMP_DIR, blank=True, null=True) then i use a modelform as an create user form. And the avatar is uploaded corrcet. Which upload to AVATAR_TEMP_DIR, then I move the avatar into