Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed

Conversation

ababic
Copy link
Contributor

@ababic ababic commented Feb 17, 2024

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.

@ababic ababic marked this pull request as draft February 17, 2024 11:12
@ababic ababic force-pushed the feature/refactor-datetime-transformations branch 2 times, most recently from de37575 to 7784dd7 Compare February 17, 2024 11:38
@ababic ababic force-pushed the feature/refactor-datetime-transformations branch 2 times, most recently from 2702626 to 0f59378 Compare February 22, 2024 14:57
…n expressions for date, time and datetime fields
@ababic ababic force-pushed the feature/refactor-datetime-transformations branch 3 times, most recently from b8a67c3 to 7276d01 Compare February 22, 2024 15:20
@ababic ababic marked this pull request as ready for review February 22, 2024 15:21
@ababic ababic force-pushed the feature/refactor-datetime-transformations branch from 7276d01 to 01653d4 Compare February 22, 2024 15:25
Copy link
Contributor

@gasman gasman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ababic - this is a really nice improvement!

gasman added a commit that referenced this pull request Feb 26, 2024
@gasman
Copy link
Contributor

gasman commented Feb 26, 2024

Merged in 80149f3 + parents.

@gasman gasman closed this Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants