This commit is contained in:
j 2011-05-30 15:40:16 +02:00
commit 41a40de2d7
3 changed files with 21 additions and 2 deletions

View file

@ -9,7 +9,6 @@ from django.contrib.auth.models import User, Group
import managers
class Place(models.Model):
'''
Places are named locations, they should have geographical information attached to them.
@ -69,6 +68,11 @@ class Place(models.Model):
j[key] = getattr(self, key)
return j
def update_matches(self):
import random
self.matches = random.randInt(0, 100)
self.save()
def save(self, *args, **kwargs):
if not self.name_sort:
self.name_sort = self.name #', '.join(self.name)