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 callable, but using self.objects.count() + 1 doesn't work, because 'self' hasn't been defined. Can anyone point me to an example of how I can accomplish this? TIA, Brandon --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---