django.views.generic.list_detail.object_detail and previous/next
|Reported by:||jcburns@…||Owned by:||jacob|
|Severity:||normal||Keywords:||previous next generic.list|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have a page that lists a bunch of Geolocation objects (using the generic view list, works great.) I have a detail page (django.views.generic.list_detail.object_detail) that works great the same way...displaying one geolocation (with a tiny Google map, nice.) But when it comes to getting a reference to the previous and next geolocations in the result so you can have links on the page for previous geolocation and next geolocation? That functionality appears to be missing.
(The primary key IDs are not consecutive...they are mostly, but there are gaps.)
This seems like something fundamental and generic-ish, hence my attempt to use a generic view. Would you consider passing references to the previous object and next object into django.views.generic.list_detail.object_detail so that it's easy to implement this important function from your (otherwise powerful) generic views?