Djeography is a django application for participatory and activist cartography.
See an example project and/or check out a demo.
-
Install
djeography$ pip install git+https://github.com/g-fabiani/djeography -
Add
djeographyand its dependencies toINSTALLED_APPSinsettings.pyfor your project:INSTALLED_APPS = [ ..., 'leaflet', 'djgeojson', 'tinymce', 'djeography' ] -
Include djeography URLconf in your project
urls.py:path('map/', include('djeography.urls')), -
Add configurations for
django-leafletLEAFLET_CONFIG = { 'FORCE_IMAGE_PATH': True, 'DEFAULT_CENTER': [41.919, 14.414], 'DEFAULT_ZOOM': 6, 'MAX_ZOOM': 19, 'RESET_VIEW': False, 'PLUGINS': { 'beautify-marker': { 'js': 'map/beautifymarker/leaflet-beautify-marker-icon.js', 'css': 'map/beautifymarker/leaflet-beautify-marker-icon.css' }, 'control-geocoder': { 'js': 'https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js', 'css': 'https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.css', 'auto-include': True }, 'marker-cluster': { 'js': 'https://unpkg.com/[email protected]/dist/leaflet.markercluster.js', 'css': ['https://unpkg.com/[email protected]/dist/MarkerCluster.css', 'https://unpkg.com/[email protected]/dist/MarkerCluster.Default.css'] }, 'featuregroup-subgroup': { 'js': 'https://unpkg.com/[email protected]/dist/leaflet.featuregroup.subgroup.js' } } } -
Run
python manage.py migrateto create the models in your database. -
Your map will be available at http://127.0.0.1:8000/map/fullscreen/.
Add a new section in your settings:
DJEOGRAPHY_CONFIG = {
# conf here
}
The list view for entities is paginated by 6 by default. You can specify a different number of entities for page using:
'PAGINATION': 10
By default we made available 3 evaluation levels for reported entities:
- Negative
- Mixed
- Positive
You can add, remove or change evaluation levels in the admin.
You can set the marker color for each evaluation level in the admin.
The color of markers having no evaluation level is controlled in the application configuration (accepts html color names or hex codes):
'DEFAULT_MARKER_COLOR': 'purple'

