#3148: Add getters and setters to model fields ---------------------------------------------------+------------------------ Reporter: j...@jerf.org | Owner: Alex Status: assigned | 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 josh.smea...@gmail.com):
One of my pet peeves is that Django models are almost always used as simple data containers. This is true for many frameworks and technologies though. What is wrong with defining methods on the class explicitly that are responsible for setting the correct fields, where there is logic associated with them? Allow the users of the model to decide whether they call the documented api of the model, or go directly to the fields. -- Ticket URL: <http://code.djangoproject.com/ticket/3148#comment:41> 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 django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.