#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:  0                             |   Needs_tests:  0       
Needs_better_patch:  1                             |  
---------------------------------------------------+------------------------
Comment (by Gulopine):

 After doing some work on this, I'll throw in one particular comment about
 naming. Python's built-in {...@property}}} methods require that all the
 methods have the same name, because things go pretty wonky if you don't.
 They have their reasons, I'm sure, but I don't think that requirement
 makes a lot of sense in our situation. Instead, I'm going with the (much
 more obvious, IMO) approach of leaving any user-created methods in place
 and updating the field object to work as a descriptor. In the context of
 what a model definition looks like, I think that makes the most sense.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3148#comment:26>
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.


Reply via email to