Skip to content

Instantly share code, notes, and snippets.

@fkumro
Created May 13, 2014 13:12
Show Gist options
  • Save fkumro/5d4005de68d44a14bf32 to your computer and use it in GitHub Desktop.
Save fkumro/5d4005de68d44a14bf32 to your computer and use it in GitHub Desktop.
Tastypie Example
class Foo(object):
@property
def acct_num(self):
# perform action on another db field to get the acct_num
@acct_num.setter
def acct_num(self, value):
# operate on value and then set to db field
# Now in my Resource file
acct_num = fields.CharField(attribute='acct_num')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment