Re: Get PK value in Field class after saving

2007-11-07 Thread Marty Alchin
On 11/6/07, Frank 7200 <[EMAIL PROTECTED]> wrote: > I have a Field class for attachments and I would like to rename the > attachment after upload. This class inherits from models.ImageField. > > The problem is that in field method save_file() and _save() all values > pointing to ID are None. >

Get PK value in Field class after saving

2007-11-05 Thread Frank 7200
Hi, I have a Field class for attachments and I would like to rename the attachment after upload. This class inherits from models.ImageField. The problem is that in field method save_file() and _save() all values pointing to ID are None. new_object['id'] is None and instance._get_pk_val() is None