From 53f9a904b2fcd6d2ab6cc57c5491d534c3cd06ce Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 21 Jun 2013 18:02:02 +0200 Subject: [PATCH] Use markdown in feature description --- requirements.pip | 3 ++- umap/settings/base.py | 1 + umap/templates/leaflet_storage/feature_detail.html | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 umap/templates/leaflet_storage/feature_detail.html diff --git a/requirements.pip b/requirements.pip index 1d8f9805..50a908a0 100644 --- a/requirements.pip +++ b/requirements.pip @@ -4,4 +4,5 @@ django-leaflet-storage==0.3.0 django_compressor==1.2 django-social-auth==0.7.20 git+git://github.com/yohanboniface/vectorformats.git@leafletstorage -hg+https://bitbucket.org/liberation/sesql \ No newline at end of file +hg+https://bitbucket.org/liberation/sesql +Markdown==2.3.1 \ No newline at end of file diff --git a/umap/settings/base.py b/umap/settings/base.py index 101fc8b8..f0b4b2b8 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -46,6 +46,7 @@ INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.gis', + 'django.contrib.markup', ) #============================================================================== diff --git a/umap/templates/leaflet_storage/feature_detail.html b/umap/templates/leaflet_storage/feature_detail.html new file mode 100644 index 00000000..05d450a6 --- /dev/null +++ b/umap/templates/leaflet_storage/feature_detail.html @@ -0,0 +1,5 @@ +{% load markup %} +
{{ feature }}
+{% if feature.description %} +
{{ feature.description|urlize|markdown }}
+{% endif %} \ No newline at end of file