Small Tweaks
This commit is contained in:
parent
6f6bd6376d
commit
b845cc054a
@ -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
|
||||||
)
|
)
|
||||||
|
@ -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={
|
||||||
|
Loading…
Reference in New Issue
Block a user