{"id":21170256,"url":"https://github.com/danieldev0724/django-leaflet-admin-list","last_synced_at":"2026-05-20T03:36:07.397Z","repository":{"id":188892010,"uuid":"661969857","full_name":"danieldev0724/django-leaflet-admin-list","owner":"danieldev0724","description":"The Django Leaflet Admin List package provides an admin list view featured by the map and bounding box filter for the geo-based data of the GeoDjango. ","archived":false,"fork":false,"pushed_at":"2023-07-04T04:52:32.000Z","size":219,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-16T16:13:15.336Z","etag":null,"topics":["django","geodjango","leaflet","map","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danieldev0724.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-04T04:52:12.000Z","updated_at":"2023-07-18T09:34:53.000Z","dependencies_parsed_at":"2023-08-17T11:09:25.566Z","dependency_job_id":null,"html_url":"https://github.com/danieldev0724/django-leaflet-admin-list","commit_stats":null,"previous_names":["danieldev0724/django-leaflet-admin-list"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieldev0724%2Fdjango-leaflet-admin-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieldev0724%2Fdjango-leaflet-admin-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieldev0724%2Fdjango-leaflet-admin-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieldev0724%2Fdjango-leaflet-admin-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danieldev0724","download_url":"https://codeload.github.com/danieldev0724/django-leaflet-admin-list/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243616757,"owners_count":20319952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","geodjango","leaflet","map","python"],"created_at":"2024-11-20T15:57:46.397Z","updated_at":"2026-05-20T03:36:02.371Z","avatar_url":"https://github.com/danieldev0724.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests](https://github.com/nnseva/django-leaflet-admin-list/actions/workflows/test.yml/badge.svg)](https://github.com/nnseva/django-leaflet-admin-list/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/nnseva/django-leaflet-admin-list/branch/master/graph/badge.svg?token=PT13IGSDNM)](https://codecov.io/gh/nnseva/django-leaflet-admin-list)\n\n# Django Leaflet Admin List\n\n![Screen Example](https://github.com/nnseva/django-leaflet-admin-list/raw/master/screen_example.png)\n\nThe [Django Leaflet Admin List](https://github.com/nnseva/django-leaflet-admin-list) package provides an admin list view\nfeatured by the map and bounding box filter for the geo-based data of the GeoDjango. It requires\na [django-leaflet](https://github.com/makinacorpus/django-leaflet) package.\n\n## Installation\n\n*Stable version* from the PyPi package repository\n```bash\npip install django-leaflet-admin-list\n```\n\n*Last development version* from the GitHub source version control system\n```\npip install git+git://github.com/nnseva/django-leaflet-admin-list.git\n```\n\n### Compatibility notice for libgdal\n\nUse proper versions of **libgdal** library with older Django versions.\n\nSome strange effect of reverting coordinates in the GeoJSON (not concerning to the package, but regarding to the Django itself)\nhas been found with the modern **libgdal** version (2.9) and the following Django versions: *2.0, 2.1, 2.2, 3.0*\n\nDowngrade libgdal to the **libgdal26** (present in the Ubuntu apt repository) if you would like to use such Django versions.\n\nThe source of the effect is backward incompatibility of **libGDAL**, the issue [here](https://github.com/OSGeo/gdal/issues/1546)\ndescribes the problem.\n\n## Configuration\n\nInclude the `leaflet_admin_list` application into the `INSTALLED_APPS` list, like:\n\n```python\nINSTALLED_APPS = [\n    'django.contrib.admin',\n    'django.contrib.auth',\n    ...\n    'leaflet',\n    'leaflet_admin_list',\n    ...\n]\n```\n\n## Using\n\nIn your admin.py:\n```python\n...\nfrom leaflet.admin import LeafletGeoAdminMixin\nfrom leaflet_admin_list.admin import LeafletAdminListMixin\n...\n\nclass WaypointAdmin(LeafletAdminListMixin, LeafletGeoAdminMixin, ModelAdmin):\n    ...\n```\n\n## Visual View\n\nOpen the admin list view and see the map above the list of objects. Every object in the list is represented on the map.\n\nAlso, the bounding box filter is added to the list of filters.\n\nUse a bounding box filter to filter objects by the geometry. Just press the 'Current map bounding box' link to filter out\nobjects outside of the current map bounding box. The current filtering box will be represented on the map as a rectangle. The color\nof the rectangle is shown to the right of the 'Current map bounding box' link. Manual input of the `bounding_box` parameter\nin the address box also works.\n\nAs usual, pressing the filter or paging link will reload a page with new parameters. The map keeps its position\nfor standard static Django filters and pager using permalink.\n\n## Customizing view\n\nThe geodata shown on the map is represented as GeoJSON feature collection. Every GeoJSON feature corresponds to one geo field of one Django\nmodel instance. All standard Django geometry-based fields are shown on the map by default. Every such feature has the following\nlist of mandatory properties to be used:\n\n- `field` identifies the geometry field shown\n- `app_label` and `model_name` identify the model of the instance shown\n- `pk` is an instance primary key which identifies the model instance shown\n\nThe following optional GeoJSON feature properties are used to customize the look and feel of the feature on the map:\n\n- `popup` if present, is used to create a popup. A value started with '\u003c' is used to create an HTML popup,\n  else the text popup is used, see also [bindPopup method](https://leafletjs.com/reference-1.7.1.html#layer-bindpopup)\n- `tooltip` if present, is used to create a tooltip. A value started with '\u003c' is used to create an HTML tooltip,\n  else the text tooltip is used, see also [bindTooltip method](https://leafletjs.com/reference-1.7.1.html#layer-bindtooltip)\n- `line_style` if present, is used to apply as an `options` parameter when creating lines and polygons, see also Leaflet [Path options](https://leafletjs.com/reference-1.7.1.html#path-option)\n- `point_style` if present, is used as an `options` parameter to create a Leaflet marker, see also [Marker options](https://leafletjs.com/reference-1.7.1.html#marker)\n- an `icon` member of the `point_style` if present, is used as an `options` parameter to create a Leaflet icon, see also [Icon options](https://leafletjs.com/reference-1.7.1.html#icon)\n\nThe Admin class may override every part of this data, or even the whole data output overriding admin methods producing this data:\n\n- `get_geojson_feature_list(request, queryset)` returns the whole GeoJSON `FeatureList` instance representing a `queryset`\n- `get_geojson_features(request, o, queryset)` returns the `features` member of the `FeatureList` instance for the model instance `o`\n- `get_geojson_geometry_fields(request, o, queryset)` returns a list of geometry field names that need to be included in the feature list\n- `get_geojson_feature(request, name, o, queryset)` returns a GeoJSON `Feature` instance representing the instance `o` geometry field `name`\n- `get_geojson_geometry(request, name, o, queryset)` returns a `geometry` member of the GeoJSON `Feature` instance representing the instance `o` geometry field `name`\n- `get_geojson_properties(request, name, o, queryset)` returns a `properties` member of the GeoJSON `Feature` instance representing the instance `o` geometry field `name`\n- `get_geojson_feature_popup(request, name, o, queryset)` returns a `popup` property of the GeoJSON `Feature` instance representing the instance `o` geometry field `name`\n- `get_geojson_feature_tooltip(request, name, o, queryset)` returns a `tooltip` property of the GeoJSON `Feature` instance representing the instance `o` geometry field `name`\n- `get_geojson_feature_verbose_name(request, name, o, queryset)` returns a verbose name of the instance `o` geometry field `name` which is used to create popup and tooltip\n- `get_geojson_feature_line_style(request, name, o, queryset)` returns a `line_style` property of the GeoJSON `Feature` instance representing the instance `o` geometry field `name`\n- `get_geojson_feature_point_style(request, name, o, queryset)` returns a `point_style` property of the GeoJSON `Feature` instance representing the instance `o` geometry field `name`\n- `get_geojson_feature_icon_style(request, name, o, queryset)` returns an `icon` member of the `point_style` property of the GeoJSON `Feature` instance representing the instance `o` geometry field `name`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieldev0724%2Fdjango-leaflet-admin-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanieldev0724%2Fdjango-leaflet-admin-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieldev0724%2Fdjango-leaflet-admin-list/lists"}