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
AVATAR_ORIGINAL_PATH and make user.avatar._name as AVATAR_ORIGINAL_PATH %
user.id
After this, then I try to change an avatar. So I user another modelform to
update. however, this time the avatar cannot be uploaded to AVATAR_TEMP_DIR,
so I also cannot move the avatar to AVATAR_ORIGINAL_PATH.
It seems that, after create the user. the AVATAR_TEMP_DIR set to upload_to
is lost, so the program doesn't know where to upload the file.
Can anyone help me to solve this problem?
Thank you very much.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to