#29145: CIText and __eq__
------------------------------------------+------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
For comparing two model instances on equality one can iterate over all
fields in the instance and compare the fields for equality, without
querying the database. This does not work for
django.contrib.postgres.fields.citext.CIText, where "a" is equal to "A".
Under the premise that python and postgresql use the same collation, tweak
the system to compare two citext-fields in a case-insensitive manner for
equality, without touching the database (as it is done for all other
fields).
Attaching to each citext-field returned from the model an {{{__eq__}}}
doing {{{.lower()}}} could help.
--
Ticket URL: <https://code.djangoproject.com/ticket/29145>
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/057.081b9daced1da9d4c00d3a7e50b3dcda%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.