matches
This commit is contained in:
parent
8dcb5a8e31
commit
41a40de2d7
3 changed files with 21 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue