Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
moustafa-shaaban authored Mar 9, 2023
1 parent 124e549 commit 6bf0c29
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions backend/geoapp/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,6 @@ def index(request):
return render(request, 'geoapp/map.html', map)


def map_features(request):
map = folium.Map(
tiles='cartodbdark_matter',
attr= 'Public Schools in Seattle'
)

folium.TileLayer('cartodbpositron').add_to(map)

folium.LayerControl(position='bottomright').add_to(map)
Fullscreen().add_to(map)
LocateControl().add_to(map)
Geocoder().add_to(map)
folium.LatLngPopup().add_to(map)

map = map._repr_html_()

context = {
'map': map
}

return render(request, 'geoapp/create_feature.html', context)


class CreateFeature(LoginRequiredMixin, generic.CreateView):
model = Feature
fields = ['name', 'type', 'description', 'latitude', 'longitude']
Expand Down

0 comments on commit 6bf0c29

Please sign in to comment.