Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Validating model.CheckConstraints#9648

Unanswered
thisisjab asked this question inIdeas & Suggestions
Feb 10, 2025· 1 comments· 3 replies
Discussion options

As far as I am concerned, DRF does not automatically support checking for database constraints defined inmodel._meta.constrainst when it comes to serializer-level validation. Is there any reason why not?

I am really determined to create a PR for this feature, but realized that DRF doesn't accept any new feature:

At this point in its lifespan we consider Django REST framework to be feature-complete. We focus on pull requests that track the continued development of Django versions, and generally do not accept new features or code formatting changes.

Why is that?

You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

I think this feature was added to Django a few versions back but that arrived at the time when DRF development slowed down, so support wasn't added until recently. There is currently partial support for it and some improvements were recently contributed, but some are unreleased:

You must be logged in to vote
3 replies
@thisisjab
Comment options

I specifically mean check constraints which are not checked. The problem is database integrity errors occur if check constraints are not handled during development and inside serializer. I am pleased and eager to contribute to this by developing support for check constraint handling inside serializer.

@auvipy
Comment options

I specifically mean check constraints which are not checked. The problem is database integrity errors occur if check constraints are not handled during development and inside serializer. I am pleased and eager to contribute to this by developing support for check constraint handling inside serializer.

Anything that is in new django versions but not fully supported in DRF are high prority for us. so you can start working on missing django features in DRF. because those are needed for compatibility issues. ping me with a draft PR and here is a somewhat related issue#7173

@thisisjab
Comment options

Ok. Thanks a lot.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
None yet
3 participants
@thisisjab@browniebroke@auvipy

[8]ページ先頭

©2009-2025 Movatter.jp