Small Tweaks

This commit is contained in:
reverend 2020-12-24 19:25:37 +01:00
parent 6f6bd6376d
commit b845cc054a
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class Explorer(models.Model):
favorite_places = models.ManyToManyField( favorite_places = models.ManyToManyField(
Place, Place,
related_name='favorite_places', related_name='explorer_favorites',
verbose_name='Explorers favorite places', verbose_name='Explorers favorite places',
blank=True blank=True
) )

View File

@ -16,7 +16,7 @@ from lostplaces.models.place import Place, PlaceAsset
class ExplorerProfileView(IsAuthenticatedMixin, View): class ExplorerProfileView(IsAuthenticatedMixin, View):
def get(self, request, explorer_id): def get(self, request, explorer_id):
explorer = get_object_or_404(Explorer, pk=explorer_id) explorer = get_object_or_404(Explorer, pk=explorer_id)
place_list = Place.objects.filter(submitted_by=explorer) place_list = explorer.places.all()
place_count = place_list.count() place_count = place_list.count()
context={ context={