Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save victorono/86c162066533e2223c04 to your computer and use it in GitHub Desktop.
Save victorono/86c162066533e2223c04 to your computer and use it in GitHub Desktop.
from django.db import models
class Person(models.Model):
_first_name = models.CharField(max_length=30, db_column='first_name')
last_name = models.CharField(max_length=30)
@property
def first_name(self):
"""your logic here, return value"""
return "foo"
@first_name.setter
def first_name(self, value):
self._first_name = value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment