Re: Returning values from calculations done by custom methods in models

2012-02-18 Thread Gchorn
Whoops, wow that really was basic Python. Sorry for the spam; of course I know there's a difference between calling a method and calling an attribute...how embarassing. =) Thanks for your help Anssi. Also thanks for not adding, ", you moron!" to the end of each sentence... On Feb 19, 9:47 am, a

Re: Returning values from calculations done by custom methods in models

2012-02-18 Thread akaariai
On Feb 19, 3:38 am, Gchorn wrote: > Hello All, > > So in my models.py file, I have: > > class Player(models.Model): >         team = models.ForeignKey(Team) >         first_name = models.CharField(max_length=100) >         last_name = models.CharField(max_length=100) >         gp = models.IntegerF

Returning values from calculations done by custom methods in models

2012-02-18 Thread Gchorn
Hello All, So in my models.py file, I have: class Player(models.Model): team = models.ForeignKey(Team) first_name = models.CharField(max_length=100) last_name = models.CharField(max_length=100) gp = models.IntegerField(max_length=2) #games played mp = model