README.md 1.38 KB
Newer Older
Yohan Boniface's avatar
Yohan Boniface committed
1
[![Build Status](https://travis-ci.org/umap-project/django-leaflet-storage.svg)](https://travis-ci.org/umap-project/django-leaflet-storage)
Yohan Boniface's avatar
Yohan Boniface committed
2 3
[![Requirements Status](https://requires.io/github/umap-project/django-leaflet-storage/requirements.svg?branch=master)](https://requires.io/github/umap-project/django-leaflet-storage/requirements/?branch=master)

Yohan Boniface's avatar
Yohan Boniface committed
4 5 6 7 8 9 10 11 12 13 14
# Django-Leaflet-Storage

Provide collaborative maps for your Django project.

Django-Leaflet-Storage is a backend for [Leaflet.Storage](https://github.com/yohanboniface/Leaflet.Storage), built on top of [Geodjango](http://geodjango.org/) and [Leaflet](http://leafletjs.com).

Check the demo [here](http://umap.fluv.io)


## Installation

Yohan Boniface's avatar
Yohan Boniface committed
15
You will need a geo aware database. See [Geodjango doc](https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/) for backend installation.
Yohan Boniface's avatar
Yohan Boniface committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

Then you can pip install the app:

    pip install django-leaflet-storage


Add `leaflet_storage` to you apps:

    INSTALLED_APPS = (
        ...
        "leaflet_storage",
    )

Include `leaflet_storage` urls:

Yohan Boniface's avatar
Yohan Boniface committed
31
    (r'', include('leaflet_storage.urls')),
Yohan Boniface's avatar
Yohan Boniface committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45

Create tables:

    python manage.py migrate


## Basic usage

From the Django admin (for now), you need to create at least:

- one TileLayer instance
- one Licence instance

Then, go to the map creation page (something like http://localhost:8017/map/new), and you will be able to add features (Marker, Polygon...).