#42 Checking ListView for Levels

This commit is contained in:
2021-10-01 22:38:44 +02:00
parent b1cd8fd0cc
commit b607335299
4 changed files with 18 additions and 5 deletions

View File

@@ -82,6 +82,9 @@ class Explorer(models.Model):
choices=EXPLORER_LEVELS
)
def get_places_eligible_to_see(self):
return Place.objects.all().filter(level__lte=self.level)
def __str__(self):
return self.user.username