﻿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
28087	Allow filtering and ordering with RawQuerySet	Dmitriy Sintsov	nobody	"I implemented FilteredRawQuerySet which wraps around RawQuerySet and uses QuerySet to generate WHERE / ORDER BY statements for raw queries:

https://github.com/Dmitri-Sintsov/django-jinja-knockout/blob/master/django_jinja_knockout/query.py

It works with Django 1.8 to 1.11, but I had to fix it when database queries code were refactored in Django 1.9. So I am worrying a bit that new modifications can break it again.

Such querysets are useful when someone uses RAW queryset with ListViews which automatically generate filter() / order_by() arguments.

There is also a ListQuerySet which allows to query Prefetch object results as normal querysets. That allows to re-use the same code for different related queries.

If that is possible, it would be great to move such feature into the core. If the code is not good enough, then it could be reviewed and improved by core committer - if someone is interested, of course."	New feature	closed	Database layer (models, ORM)	dev	Normal	wontfix			Unreviewed	0	0	0	0	0	0
