On Tue, 2006-10-24 at 20:21 -0700, shelbybark wrote: > Hello all. I thought I sent this in earlier tonight, but cannot find a > record of it. So forgive me if it's a duplicate. > > While getting familiar with Jeff Croft's Lost-Theories code, I ran > across a variable called get_next_by_x (or get_previous_by_x). I have > not been able to find any documentation for this, but testing it out it > appears to be only usable by date-based item from a model. I was trying > to figure out a way to use it with a unique ID from a Flickr import of > photos, but have not found a way to get it to use the photo's ID > number. Does anyone know any more about this variable?
It's a method on models with date or datetime fields (not a variable). It's documented here: http://www.djangoproject.com/documentation/db_api/#get-next-by-foo-kwargs-and-get-previous-by-foo-kwargs This method is purely a convenience method for advancing through time-based fields. It cannot be applied to other field types (like integers), so if you want to use it for something like a photo stream, you would need to associate a date and time with the photos in order to be able to move through them chronologically. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---