#24648: Model fields that reference settings that differ between dev and prod
trigger the autodetector
--------------------------------------+------------------------------------
     Reporter:  Christophe Pettus     |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Migrations            |                  Version:  1.8
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by Tai Lee):

 We've encountered issues with migrations storing serialized settings at
 the time the migration was created. We've always fixed them in our
 projects and suggested to 3rd party projects that they simple edit the
 resulting migration to import and use the setting directly instead of its
 serialized value. No need for callables.

 I suppose something like `SettingsReference` might allow the auto
 migration to detect and properly reference the setting automatically, but
 it seems like an *extremely* easy mistake to forget to do this in advance
 and to end up with serialized migrations where the fix still requires
 manually editing the migration, at which point the use of
 `SettingsReference` is redundant.

--
Ticket URL: <https://code.djangoproject.com/ticket/24648#comment:7>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.e457ba9dfd9d6bbb1591b95d2756638d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to