title: Dynamically add properties to Django model
body: <p>Currently I have the following Django model</p>
  
  <pre><code>class TestUser(models.Model):
      name = models.CharField(max_length=250)
      email = models.CharField(max_length=250)
      ...
  
      class Meta:
          db_table = 'temp_user'
  </code></pre>
  
  <p>and I've the following method.</p>
  
  <pre><code>def print_name(self):
      return self.name
  </code></pre>
  
  <p>I want to add this method as a property to <code>TempUser</code> model. I know this can be done by putting the method inside <code>TempUser</code> class and user <code>@property</code>. But I want to do it dynamically.</p>
  
  <p>I tried this from python shell.</p>
  
  <pre><code>In [10]: TempUser.print_name = property(print_name)
  
  In [11]: TempUser.print_name
  Out[11]: &lt;property at 0x7efc374e7c58&gt;
  
  In [12]: user = TempUser.objects.get(pk=1)
  
  In [13]: user.print_name
  Out[13]: u'Test User'
  </code></pre>
  
  <p>But once I exit the shell, I loose the property. Is there any way to add the property permanently.</p>