skillfed

django-leaflet

A Django map widget using Leaflet

django-leaflet v0.33.0 111.2K downloads/30d#12,429 on PyPI748
Copyleft license LGPL-3.0-only AGING released

What it is and what it does

django-leaflet packages the Leaflet JavaScript mapping library (version 1.9.3) as a reusable Django app, eliminating the need to embed map assets in every project. It provides form widgets for geometry editing, template tags for rendering maps, and centralized control over map appearance and behavior through Django settings.

The package is designed for developers building location-aware Django applications who want interactive client-side maps without managing Leaflet dependencies manually. It supports geometry edition through form widgets and integrates with geographic data workflows, though spatial database support is optional—you can handle geographic data without PostGIS or similar if needed.

Use it for:

  • Add interactive map widgets to Django admin or custom forms for location selection and geometry editing.
  • Display geographic data on web pages using Leaflet maps configured entirely from Django settings.
  • Build location-based applications (e.g., store locators, event maps) without duplicating Leaflet setup across projects.
  • Manage map appearance and behavior (tiles, zoom, center) at deployment time via Django configuration.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates the Leaflet JavaScript mapping library into Django projects, providing map widgets for forms and template rendering with server-side configuration.

Yes, if you need Leaflet maps in a Django project. Low install friction, stable production status, and active repository support make it a sound choice. The LGPL-3.0-only license is a consideration for proprietary work but poses no barrier for open-source projects. No known vulnerabilities. Maintenance pace is slower than recent, but the package is mature and the underlying Leaflet library is widely used.

Install

django-leaflet on PyPI

pip

pip install django-leaflet

uv

uv add django-leaflet

poetry

poetry add django-leaflet

Installing django-leaflet

Before you install

Low friction install with a single runtime dependency on django. Last release was 256 days ago; repository is active and not archived, though maintenance pace appears to have slowed.

License in practice

Licensed under LGPL-3.0-only (copyleft). You must disclose source code modifications and distribute derivative works under the same license; suitable for open-source projects but requires careful review for proprietary applications.

Quickstart

pip install django-leaflet

# In Django settings.py
INSTALLED_APPS = ['leaflet', ...]

# In a template
{% load leaflet_tags %}
{% leaflet_js %}
{% leaflet_css %}

Requires Python 3.10 or later and Django as a runtime dependency.

Verify before relying

  • Whether the embedded Leaflet version 1.9.3 receives security updates independently or requires django-leaflet releases
  • Compatibility with django-geojson and whether that integration requires additional setup beyond what the package provides

Package facts

License LGPL-3.0-only (copyleft)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — django
Maintenance aging — 256 days since the last release
Last repo commit
First released
Downloads 111,170/month — #12,429 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_leaflet-0.33.0-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Utilities

Tags

django map widgetleaflet django integrationinteractive maps djangogeographic forms djangomap visualization django
geospatialmappingdjango-widget

More Utilities packages