Changes between Initial Version and Version 1 of Ticket #35731, comment 1
- Timestamp:
- Sep 4, 2024, 7:45:24 PM (3 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35731, comment 1
initial v1 15 15 Given your report is specific to model instance initialization and includes an example of a `db_default` composed of a literal that can be expressed as `default` I believe that your expectations are met by defining your field as `IntegerField(default=10, db_default=10)`. I suspect that this feature that was specifically designed for the use case you had in mind. 16 16 17 I'll let others chime in as I'm unsure if this should be closed as ''invalid'' (as specifying `default` achieves what you're after) or accepted as a documentation improvement given [https://github.com/django/django/pull/16092#issuecomment-1265398322 the use case for defining both was brought up during the review phase] and didn't make the cut.17 I'll let others chime in as I'm unsure if this should be closed as ''invalid'' (as specifying `default` achieves what you're after) or accepted as a documentation improvement given [https://github.com/django/django/pull/16092#issuecomment-1265398322 documenting the use case for defining both was brought up during the review phase] and didn't make the cut.