wagtail / django-modelcluster

Django extension to allow working with 'clusters' of models as a single unit, independently of the database
BSD 3-Clause "New" or "Revised" License
485 stars 66 forks source link

Refactor date/time/day/hour test expressions as 'transform expressions' #185

Closed ababic closed 9 months ago

ababic commented 9 months ago

These PR offers the following benefits/fixes:

  1. Adds support for the newer iso_weekday and iso_year field lookups.
  2. Extends support of these 'transformative' field lookups to values() and values_list(), which currently throw difficult-to-understand AttributeError exceptions when such expressions are encountered (due to being entirely reliant on get_model_field() and extract_field_value()).
  3. Introduces a clearer logical separation between 'comparisson' and 'field transformation' expressions, and how they are handled.
gasman commented 9 months ago

Merged in 80149f340c502980c801be7e1810971c51089ea5 + parents.