#36847: FileField(upload_to=...) callback no longer sees `auto_add_now` field
-------------------------------------+-------------------------------------
     Reporter:  Ran Benita           |                    Owner:  Nashrh
                                     |  Ashraf Khan
         Type:  Bug                  |                   Status:  assigned
    Component:  Documentation        |                  Version:  6.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Nashrh Ashraf Khan):

 Approach:

 The save-order change in Django 6.0 appears intentional, and `upload_to`
 callables are executed before fields populated during `Model.save()`
 (e.g. `auto_now`, `auto_now_add`, and the primary key) are assigned
 values.
 Rather than changing the behavior, I plan to clarify this in the
 documentation
 and add a note to the Django 6.0 release notes.

 I will submit a documentation-focused PR reflecting this.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36847#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019b97b227dd-22fb10b9-e379-4261-8f8e-c4d9e1c4282c-000000%40eu-central-1.amazonses.com.

Reply via email to