﻿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
29526	Use of QuerySet.extra() when excluding twice a string occurance	Manuel Strehl	nobody	"The documentation told me to open this bug :-)

My use case for `.extra()` is a query, where I have to filter for a certain term but need to exclude objects, where the term appears twice:

    MyModel.object.filter(name__contains=term).extra(where=['name NOT LIKE %s'], params=['{}%{}'.format(term, term)])

One possibility to remove the need for `.extra()` in my case would be, if one could opt-out of the `%` escaping in `.filter()` and `.exclude()`:

    ....exclude(name__contains=term+'%'+term, keep_placeholders=True)"	Uncategorized	closed	Uncategorized	2.0	Normal	invalid	QuerySet.extra		Unreviewed	0	0	0	0	0	0
