#24949: Force to_field and probably other fields to unicode during migration
deconstruction
----------------------------+------------------------------------
     Reporter:  MarkusH     |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  1.7
     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
----------------------------+------------------------------------
Changes (by MarkusH):

 * stage:  Unreviewed => Accepted


Comment:

 After a brief talk with Andrew we agreed on converting all string
 attributes to unicode (`force_text()`) in the fields' `__init__()`
 methods. That should fix the issue and possibly other issues in the
 future. There are a few things to consider, though:

 * For `BinaryField` we need to keep the byte string, though for
 `CharField` and `TextField` it should be unicode.

 * The `verbose_name` and `help_text` attributes are often used with
 `(u)gettext_lazy()`. Although I'm lacking a real use case for
 `gettext_lazy()` in general, we need to find a way to force these values
 to unicode once they are evaluated.

--
Ticket URL: <https://code.djangoproject.com/ticket/24949#comment:1>
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/065.02d97379114c69b1d379157ed98cf315%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to