Hello, what I need is a modelField that provides sequence-functionality for a model. This field should have the following features: - auto_increment when a new instance of the Model is created - a method move_up() // Increments the sequence of the object - a method move_down() // Decreases the sequence of the object - a method sync_order() // Syncronizes all sequences; This sould be called when a certain model-instance was deleted. The method finds the "hole" and decreses all other items greater than the one that was deleted.
My plan was to extend PositiveIntegerField and adding the desired functionality. But I could not figure out how to add auto_increment, without falling back to raw sql. ...and how to add the 3 methods I mentioned above Here a short example how a Model containing the SequenceField should be used: n = News.objects.get(pk = id) n.moveUp() || n.moveDown() I am relativley new to Django, and need some help of how to implement this custom model field. Thanks, Toni --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---