Added export of place coords to home conext.
This commit is contained in:
parent
2b56eed759
commit
0b0a401486
@ -64,8 +64,10 @@ class PlaceDetailView(IsAuthenticated, View):
|
|||||||
class HomeView(View):
|
class HomeView(View):
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
place_list = Place.objects.all().order_by('-submitted_when')[:10]
|
place_list = Place.objects.all().order_by('-submitted_when')[:10]
|
||||||
|
place_map_center = Place.average_latlon()
|
||||||
context = {
|
context = {
|
||||||
'place_list': place_list
|
'place_list': place_list,
|
||||||
|
'place_map_center': place_map_center
|
||||||
}
|
}
|
||||||
return render(request, 'home.html', context)
|
return render(request, 'home.html', context)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user