Hi!
I have the following models:
class Player(models.Model):
name = models.CharField('Name', max_length=40)
pub_date = models.DateTimeField('date added',
default=datetime.datetime.now)
def __unicode__(self):
return self.name
def goals(self):
g = 0
ms1 = Mat
Hi!
I have the following models:
class Player(models.Model):
name = models.CharField('Name', max_length=40)
def __unicode__(self):
return self.name
def goals(self):
g = 0
ms = Match.objects.select_related().filter(
Q(opp1=self)|Q(opp2=self) )
for m
Wow thanks!
That's really going fast now.
I would have never come to that idea :)
One more question:
Is this how you meant to set the instance variable or did you mean in
another way?
def __init__(self, *args, **kwargs):
super(Player, self).__init__(*args, **kwargs)
self.matc
I think aggregation can't be used because the calculations are a bit more
complex than just the sum/average/count/min/max of one field.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.go
4 matches
Mail list logo