Installation¶
Last stable version:
pip install django-leaflet
Last development version (master branch):
pip install -e git+https://github.com/makinacorpus/django-leaflet.git#egg=django-leaflet
Dependencies¶
django-leaflet requires the GDAL library installed on the system. Installation instructions are platform-specific.
Configuration¶
Add
leaflet
to yourINSTALLED_APPS
Add the HTML header:
{% load leaflet_tags %} <head> ... {% leaflet_js %} {% leaflet_css %} </head>
Add the map in your page, providing a name:
... <body> ... {% leaflet_map "yourmap" %} ... </body>
Your map shows up!
Example¶
Check out the example project for a complete integration!