About Map Views
Create a Leaflet map view with the folium
package:
import folium
from django.http import HttpResponse
def display_map(request):
map = folium.Map([52.520833, 13.409444], zoom_start=17)
folium.Marker(
location=[52.520833,13.409444],
tooltip="Click me!",
popup="TV Tower",
icon=folium.Icon(icon="blue"),
).add_to(map)
return HttpResponse(map.get_root().render())
Then you can insert that view into any page as an iframe.
Tips and Tricks Programming Development Django 5.x Django 4.2 Django 3.2 Leaflet.js folium
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.