Something like this perhaps... first_record = models.get_list(order_by = ['id'], limit = 1)[0]
Maybe even .get_object() if it works with limit 1. On 3/8/06, Andy Shaw <[EMAIL PROTECTED]> wrote: > > As the ID field is auto-incremented, the earliest ('first') record will > be the one with the lowest ID. In python, you can determine this by > pulling all records from the database and finding the one with the > lowest ID, or you can write a custom SQL query to do the same thing. I > don't know if Django currently has a built-in feature to let you do > this, though it is possible that the database will return the records in > creation order anyway (someone correct me here). > > -Andy -- Julio Nobrega - http://www.inerciasensorial.com.br --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---