adapting list views
This commit is contained in:
@@ -23,7 +23,10 @@ class PlaceListView(IsAuthenticated, ListView):
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['place_map_center'] = Place.average_latlon(context['place_list'])
|
||||
context['map_config'] = {
|
||||
'point_list': context['place_list'],
|
||||
'map_center': Place.average_latlon(context['place_list'])
|
||||
}
|
||||
return context
|
||||
|
||||
class PlaceDetailView(IsAuthenticated, View):
|
||||
|
Reference in New Issue
Block a user