title: Do properties work on Django model fields?
body: <p>I think the best way to ask this question is with some code... can I do this:</p>
  <pre><code>class MyModel(models.Model):    
      foo = models.CharField(max_length = 20)    
      bar = models.CharField(max_length = 20)  
  
      def get_foo(self):  
          if self.bar:  
              return self.bar  
          else:  
              return self.foo  
  
      def set_foo(self, input):  
          self.foo = input  
  
      foo = property(get_foo, set_foo)  
  </code></pre>
  <p>or do I have to do it like this:</p>
  <pre><code>class MyModel(models.Model):
      _foo = models.CharField(max_length = 20, db_column='foo')
      bar = models.CharField(max_length = 20)
  
      def get_foo(self):
          if self.bar:
              return self.bar
          else:
              return self._foo
  
      def set_foo(self, input):
          self._foo = input
  
      foo = property(get_foo, set_foo)
  </code></pre>
  <p><strong>note</strong>: you can keep the column name as 'foo' in the database by passing a db_column to the model field. This is very helpful when you are working on an existing system and you don't want to have to do db migrations for no reason</p>