Re: how to modified filefiled after created it

2009-08-03 Thread Shuge Lee
I see. Thanks. On Aug 3, 1:54 pm, Daniel Roseman wrote: > On Aug 3, 1:29 pm, Shuge Lee wrote: > > > NO > > > just image add new seed in admin > > > upload a file with status "UNAPPROVE" > > then you change its status as "ACCET" > > the problem is, the file you upload is still point to UNAPPROVE

Re: how to modified filefiled after created it

2009-08-03 Thread Daniel Roseman
On Aug 3, 1:29 pm, Shuge Lee wrote: > NO > > just image add new seed in admin > > upload a file with status "UNAPPROVE" > then you change its status as "ACCET" > the problem is, the file you upload is still point to UNAPPROVE_PATH > > how to make it point to ACCEPT_PATH ? You can set the path va

Re: how to modified filefiled after created it

2009-08-03 Thread Shuge Lee
NO just image add new seed in admin upload a file with status "UNAPPROVE" then you change its status as "ACCET" the problem is, the file you upload is still point to UNAPPROVE_PATH how to make it point to ACCEPT_PATH ? On 8月3日, 下午6时45分, Peter Bengtsson wrote: > Not sure I understand what you

Re: how to modified filefiled after created it

2009-08-03 Thread Peter Bengtsson
Not sure I understand what you want to achive but you talked about changing one class attribute when you change another. Look at this for example/inspiration:: class Foo(object): status = '' def __init__(self): self.name = '' def __setattr__(self, k, v): if k == 'sta

Re: how to modified filefiled after created it

2009-08-03 Thread Shuge Lee
I think Django could add new API for FileField such as FileField.change_path(new_path) On Aug 3, 7:28 am, Shuge Lee wrote: > Please take a lookhttp://dpaste.com/74606/ > > or here > > # in models.py > > UNAPPROVE = 0 > ACCEPT = 1 > REJECT = 2 > > unapprove_path = os.path.join(MEDIA_ROOT, 'unapp