Code

Opened 20 months ago

Last modified 19 months ago

#18931 new New feature

Add predicate functionality to Q objects

Reported by: ptone Owned by: ptone
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

A predicate is condition that can be matched against some item to determine whether that item meets the condition.

Django has a relatively rich set of lookup terms that can be used in filtering a queryset.

What is proposed is a new behavior of a Q object, that allows the conditions described in the formation of a Q instance, to be tested agains a model instance.

The initial implementation of this was released separately:

https://github.com/ptone/django-predicate

Current work-in-progress to bring this into Django is here:

https://github.com/ptone/django/compare/master...q-predicate

Attachments (0)

Change History (1)

comment:1 Changed 19 months ago by ptone

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

This is now ready for more eyes to review

https://github.com/django/django/pull/388

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new
The owner will be changed from ptone to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.