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

I can upload an avatar when creating, but how can I change an avatar when updating?

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

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) &g

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

2009-04-01 Thread TTear1943
mage Path is in none") After I remove it, then it works. Maybe there is some problem in this function, but I cannot figure it out. Anyway, thanks for your reply in advance. :) On 4月1日, 下午11时39分, Karen Tracey wrote: > 2009/4/1 TTear1943 <1943@gmail.com> > > > >

Problem in Model inheritance after some objects are deleted

2009-04-04 Thread TTear1943
I use a snippet in http://www.djangosnippets.org/snippets/1034/ for my Model inheritance. It works fine at the first.However, after I delete some elements in database, the code works wrong. As I debug, I found that the problem resides in the method: as_leaf_class. In the following code: def as

Re: Problem in Model inheritance after some objects are deleted

2009-04-04 Thread TTear1943
: yield item.as_leaf_class() Is this solution correct? On Apr 4, 8:19 pm, TTear1943 <1943@gmail.com> wrote: > I use a snippet inhttp://www.djangosnippets.org/snippets/1034/for my > Model inheritance. It works fine at the first.However, after I delete > some elements i

model gets inconsistent after I delete some objects using object.delete() method

2009-04-04 Thread TTear1943
Many days ago, I deleted some object with object.delete() method. Today I found that my model Product is inconsistent now. Here is the strange result. >>> allproduct=Product.objects.all() >>> allproduct [, ] #Here shows no product with id=7 >>> for ap in allproduct: ... print ap.id ... 4 5 #pr

How can I implement an app to enable user for importing their friends from MSN, Gmail etc.

2009-04-13 Thread TTear1943
Hi all, I want to add my site an app so that enables users to invite their friends from MSN, Gmail etc. to join in my site. Is there any solution or apps for this. Thank you very much. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

How to make plain text "www.example.com" becomes an url

2009-05-26 Thread TTear1943
Hi all, In my view, I have a variable named 'site' which holds a value of "www.example.com", when render in template, I use the following method: This is an example However, when check the result, the link becomes "http:// www.mysite.com/www.example.com". while I check for the source code, it is: