#42 Checking ListView for Levels
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user