#5763: Queryset doesn't have a "not equal" filter operator -------------------------------------+------------------------------------- Reporter: jdetaeye | Owner: nobody Type: New feature | Status: closed Component: Database layer | Version: dev (models, ORM) | Severity: Normal | Resolution: wontfix Keywords: qs-rf | Triage Stage: Design | decision needed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by dvg): The "... spirit of not needlessly offering multiple ways to do the same thing ..." makes a lot of sense to me. However, there's this question on StackOverflow: [https://stackoverflow.com/questions/687295 How do I do a not equal in Django queryset filtering?] Current stats: - **555246 views** - 859 upvotes - bookmarked 179 times Just to be clear, this is a **really** high view count: top 0.02% (top 5500 out of 23 million questions, according to https://data.stackexchange.com/stackoverflow) Apparently, the alternatives to an `__ne` lookup are not that obvious to many people. Perhaps it's worth re-opening this issue and, for example, implementing the `ne` from the [https://docs.djangoproject.com/en/4.0/howto/custom- lookups/#a-lookup-example custom lookup example]? -- Ticket URL: <https://code.djangoproject.com/ticket/5763#comment:27> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/010701812409c941-7eb9f88b-8c09-4082-89b6-c5a0b18568c0-000000%40eu-central-1.amazonses.com.