﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29156	Enhance the model methods added when Meta.order_with_respect_to is used	César García Tapia	nobody	"With `order_with_respect_to`, we can do something like this:

{{{
class Book(models.Model):
    pass

class Chapter(models.Model):
    book = models.ForeignKey(Book, on_delete=models.CASCADE)

    class Meta:
        order_with_respect_to = 'book'
}}}

It would be very nice to add some obvious features to this feature, for example:

* `book.get_chapter_order()` returns the IDs of the chapters. Why not the chapter objects itself?

* Given a chapter, we can get the next and the previous chapters, but we can't easily get that chapter's order.

* It would be very nice to be able to add a chapter directly in a specific position, pretty much like python's `insert`. For example: `book.insert_chapter(chapter, 3)`

I know it's a very broad request, but, if you guys like the idea, I'd love to take a look if I can add the functions myself (one at a time, to get your approval on each of them)."	New feature	new	Database layer (models, ORM)	2.0	Normal				Someday/Maybe	0	0	0	0	0	0
