#7974: cannot replace custom fields without using database format
---------------------------------------+------------------------------------
Reporter: mspang | Owner: nobody
Status: closed | Milestone:
Component: Database wrapper | Version: 1.0-alpha
Resolution: wontfix | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------+------------------------------------
Changes (by mspang):
* cc: jacob (added)
Comment:
That works for my contrived example, but consider:
How would you write a field that stores data in the database in base64,
and expects to be assigned non-base64 strings? You can't do it, because
to_python() doesn't know whether it's coming from database or the user.
Overloading to_python() to do both "load from the database" and "set by
user" is fairly limiting. Unfortunately I didn't have time to work up a
patch that would cleanly separate them so Django 1.0 will also have this
problem. You can't work around it by writing your own descriptor, either.
--
Ticket URL: <http://code.djangoproject.com/ticket/7974#comment:2>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---