#3148: Add getters and setters to model fields
---------------------------------------------------+------------------------
          Reporter:  [email protected]                 |         Owner:  telenieko
            Status:  assigned                      |     Milestone:           
         Component:  Database layer (models, ORM)  |       Version:  SVN      
        Resolution:                                |      Keywords:           
             Stage:  Accepted                      |     Has_patch:  1        
        Needs_docs:  0                             |   Needs_tests:  0        
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by jacob):

 I'm busy and don't have time to explain this fully. However, as a note to
 myself and anyone who wants to try to channel my thinking, the syntax I'd
 like here would look like::

 {{{
 class MyModel(Model):
     foo = CharField(...)

     @foo.getter
     def get_foo(self):
         ...

     @foo.setter
     def set_foo(self, value):
         ...
 }}}

 I'll try to circle 'round back to this and explain more fully when I have
 time.

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