Re: Pre-populating an integer field with a count of model objects

2008-08-22 Thread varikin
On Aug 21, 11:29 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Aug 21, 4:42 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > I have a column, 'position', which is a PositiveIntegerField, to allow > > my end-user to order records with. I would like to pre-populate the

Re: Pre-populating an integer field with a count of model objects

2008-08-21 Thread Brandon Taylor
Hi Daniel, Thanks for the reply. I'll just go with overriding the save. Cheers, Brandon On Aug 21, 11:29 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Aug 21, 4:42 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > I have a column, 'position', which is a

Re: Pre-populating an integer field with a count of model objects

2008-08-21 Thread Daniel Roseman
On Aug 21, 4:42 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I have a column, 'position', which is a PositiveIntegerField, to allow > my end-user to order records with. I would like to pre-populate the > field when creating a new record, with the count of the model objects > +

Pre-populating an integer field with a count of model objects

2008-08-21 Thread Brandon Taylor
Hi everyone, I have a column, 'position', which is a PositiveIntegerField, to allow my end-user to order records with. I would like to pre-populate the field when creating a new record, with the count of the model objects + 1. The models documentation says 'default' can be a value or a