Changes between Initial Version and Version 1 of Ticket #37168, comment 2


Ignore:
Timestamp:
Jun 13, 2026, 11:24:47 AM (108 minutes ago)
Author:
Mariusz Felisiak

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37168, comment 2

    initial v1  
    1 We wanted to add `DatabaseDefault()` to the list of `Field.empty_values` and modify its `__hash__` and `__eq__`. Unfortunately, there is an issue in importing `DatabaseDefault` anywhere in the `forms` module and `expression` is required to initialize `DatabaseDefault`. I'm thinking about adding `is_value_empty()` hook to the `Field`:
     1We wanted to add `DatabaseDefault()` to the list of `Field.empty_values` and modify its `__hash__` and `__eq__`. Unfortunately, `expression` is required to initialize `DatabaseDefault` and, TBH, `DatabaseDefaults` with different expression should not be consider equal. I'm thinking about adding `is_value_empty()` hook to the `models.Field`:
    22{{{#!python
    33def is_value_empty(self, value):
Back to Top