Changes between Initial Version and Version 1 of Ticket #23982, comment 4


Ignore:
Timestamp:
Dec 11, 2014, 11:46:35 AM (10 years ago)
Author:
Carl Meyer

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23982, comment 4

    initial v1  
    11Yes, charettes and bmispelon are right, this is a bug in the app, not a bug in migrations.
    22
    3 Migrations are correctly and consistently recording the `verbose_name` as a bytestring when it is a bytestring, and as a text (unicode) string when it is a text string, and noticing the difference when it changes. (Note that migration files always have `from __future__ import unicode`, so an unmarked string is always a unicode string, on Python 2 or 3). That's the only sane behavior for migrations (and it was arrived at with a great deal of trial and error :-) ).
     3Migrations are correctly and consistently recording the `verbose_name` as a bytestring when it is a bytestring, and as a text (unicode) string when it is a text string, and noticing the difference when it changes. (Note that migration files always have `from __future__ import unicode_literals`, so an unmarked string is always a unicode string, on Python 2 or 3). That's the only sane behavior for migrations (and it was arrived at with a great deal of trial and error :-) ).
    44
    55The app, per our [[https://docs.djangoproject.com/en/dev/topics/python3/#unicode-literals porting to Python 3 documentation]], should also be using `from __future__ import unicode_literals` so that the actual nature of the string does not change when moving between Python 2 and 3. (Or if they don't care to support 3.2, they could explicitly mark all strings with `b` or `u` if they prefer that for some reason.)
Back to Top