#23335: Related fields pointing to custom fields that store different values in
the
database than the python representation do not remember selections
----------------------------+----------------------
Reporter: thenewguy | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.7-rc-2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------
I have uploaded a demonstration to github here:
https://github.com/thenewguy/django_custom_primary_key_related_field_incompatibility
Concisely, forms do not preserve related field selections on these custom
fields.
If you have a custom field that returns a custom object from the database
that is different from the value returned from to_python, related fields
that point to forget the current selection when they are rendered by
forms.
I encountered this attempting to use a custom field that maps signed
integers to fixed length string representation of unsigned integers for
use as identifiers.
--
Ticket URL: <https://code.djangoproject.com/ticket/23335>
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/052.15638828903b1c8607d642754ee3e8d7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.