Mariusz, I agree with the burden, but it should be noted that SQL has both
CHECK on the field and table level, and CheckConstraint only defines
table-level constraints. This is not true for unique constraints or indices.
Also, what do you think of a way for custom field classes to add
constraints,
Hi,
This proposal is not really nice from a maintenance point of view as we
will end with the same complicated situation we currently have with
uniqueness checks or indexes i.e. many ways to define the same:
- Field.unique/index
- Meta.unique_together/index_together
- Meta.constraints/indexes
Hello,
In October 2022, a stalebot was activated for djangoproject.com issues:
https://github.com/django/djangoproject.com/issues/1219
https://github.com/django/djangoproject.com/pull/1220
It comments on an issue if there's no activity in the last six months: "This
issue has been automatically
I agree this feature would be useful, at least to allow bundling check
constraints with custom field classes. As you point out the
PositiveIntegerField classes do this within Django, and doubtless many
custom fields have used the db_check() method.
The only thing I'm not a fan of in your proposal
Hi folks,
We've had check constraints for a while now and they're awesome.
I'd like to propose an alternative way to declare check constraints: at the
field level. This sounds like it's duplicating the feature but there are
some advantages that make this distinct from declaring at the model-level
At this point I'll let others chime in with their opinion on whether this
is something that needs to change because:
1. I rarely use admin
2. I've never really had the need to override a choice's display over
those supplied via `choices`
:)
On Wed, 5 Apr 2023 at 19:05, 'Ibrahim Abou Ele
Isn't this some sort of duplication? why not just use it instead of writing
its logic again?
On Wednesday, April 5, 2023 at 7:12:48 AM UTC+2 David Sanders wrote:
> Hi Ibrahim,
>
> get_FOO_display() isn't intended to be overridden like that, it's just a
> convenience method for use in templates/w