Merge branch 'master' of mowoe.com:reverend/lostplaces-backend into master
This commit is contained in:
commit
751d4c81fe
@ -29,7 +29,7 @@ class Voucher(models.Model):
|
||||
Creation date is being set automatically during voucher creation.
|
||||
"""
|
||||
|
||||
code = models.CharField(unique=True, max_length=10)
|
||||
code = models.CharField(unique=True, max_length=30)
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
expires = models.DateField()
|
||||
|
||||
@ -63,11 +63,14 @@ class Place (models.Model):
|
||||
longitude = 0
|
||||
latitude = 0
|
||||
|
||||
if amount > 0:
|
||||
for place in place_list:
|
||||
longitude += place.longitude
|
||||
latitude += place.latitude
|
||||
return (latitude / amount, longitude / amount)
|
||||
|
||||
return (latitude, longitude)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user