#3148: Add getters and setters to model fields
---------------------------------------------------+------------------------
Reporter: [email protected] | Owner: Gulopine
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 1 | Needs_tests: 0
Needs_better_patch: 1 |
---------------------------------------------------+------------------------
Comment (by blueyed):
Thanks for your feedback.
a) getter/setter/deleter now return the original function
b) I do not get this: using a decorator should make the object behave as
descriptor? Would that mean to have __get__/__set__/__del__ always, but
check there if a decorator should get called?
c) OK, moved. Much better. It took me a while to come that close already
though.. ;)
d) 1. This should fail, at least when going the property route, my
understanding is that you need to define all, otherwise the field is e.g.
not writable. This would be different when using descriptors only, of
course.
2. Only fields derived from Field are supported currently. FileField
does not come through Field - at least that's what my testing shows.
Should they get handled?
e) I think the other points should get worked out before.. :)
--
Ticket URL: <http://code.djangoproject.com/ticket/3148#comment:30>
Django <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.