diff --git a/models.py b/models.py index acd0177..33353ca 100755 --- a/models.py +++ b/models.py @@ -518,6 +518,14 @@ class Supporter(models.Model): def size(self): return self.band.size if self.band else None + @property + def country(self): + return self.band.country if self.band else None + + @property + def country_name(self): + return self.band.country.name if self.band and self.band.country else '' + @property def level(self): return self.band.level if self.band else None diff --git a/views.py b/views.py index 6f80d76..d916dff 100755 --- a/views.py +++ b/views.py @@ -153,6 +153,7 @@ def supporters(request): supporters = supporter_models.Supporter.objects.filter( active=True, display=True, + band__isnull=False, ).order_by( 'band__country', 'name' )