March 2018
Beginner to intermediate
584 pages
14h 31m
English
You created an HTML front page for the web application you developed in the previous recipe. The HTML is dynamically created using the Django template language (https://docs.djangoproject.com/en/dev/topics/templates/) and the map was implemented with the Leaflet JavaScript library.
The Django template language uses the response from the home view to generate a list of all of the sightings in the system.
The map was created using Leaflet. First, an OpenStreetMap layer was used as a base map. Then, using jQuery, you fed a GeoJSON layer that displays all of the features generated by the get_geojson view. You associated a popup with the layer that opens every time the user clicks on a sighting entity. The popup displays the main ...