Changes between Initial Version and Version 1 of Ticket #35731, comment 1


Ignore:
Timestamp:
Sep 4, 2024, 7:45:24 PM (2 weeks ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35731, comment 1

    initial v1  
    1515Given 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.
    1616
    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.
     17I'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.
Back to Top