Private
Public Access
1
0

courses and challenges small improvements

This commit is contained in:
Sander Roosendaal
2020-07-01 09:13:29 +02:00
parent 0bc9a7089b
commit ee8955629b
8 changed files with 111 additions and 17 deletions

View File

@@ -1221,6 +1221,7 @@ class GeoCourse(models.Model):
name = models.CharField(max_length=150,blank=True)
country = models.CharField(max_length=150,blank=True)
notes = models.CharField(blank=True,max_length=200,verbose_name='Course Notes')
def __str__(self):
name = self.name
country = self.country
@@ -1236,6 +1237,10 @@ class GeoCourse(models.Model):
d = d,
)
@property
def coord(self):
return course_coord_center(self)
class GeoCourseEditForm(ModelForm):
class Meta:
model = GeoCourse