From 0b0a401486683c730851909310c5bb76757b2a5e Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Thu, 20 Aug 2020 21:38:01 +0200 Subject: [PATCH] Added export of place coords to home conext. --- lostplaces/lostplaces_app/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lostplaces/lostplaces_app/views.py b/lostplaces/lostplaces_app/views.py index f622314..ac45f78 100644 --- a/lostplaces/lostplaces_app/views.py +++ b/lostplaces/lostplaces_app/views.py @@ -64,8 +64,10 @@ class PlaceDetailView(IsAuthenticated, View): class HomeView(View): def get(self, request, *args, **kwargs): place_list = Place.objects.all().order_by('-submitted_when')[:10] + place_map_center = Place.average_latlon() context = { - 'place_list': place_list + 'place_list': place_list, + 'place_map_center': place_map_center } return render(request, 'home.html', context)