Handling db_default? #9257
Unanswered
shangxiao
asked this question in
Potential Issue
Replies: 1 comment
-
|
may be we could see/try with some example use cases of the new features and then decide based on the outcomes? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Django 5.0 introduces
db_default, this now raises the question: should DRF be aware of fields with db_default set?Aside from whether DRF could potentially evaluate a
db_defaultexpression, it does have an affect on therequiredattribute during introspection, since required is determined based on the presence of field default.The workaround for now is to manually set
requiredtoFalseinextra_kwargsif you have adb_default.Beta Was this translation helpful? Give feedback.
All reactions