From 325a94338f1c1afb6d1ea41bcbac6bf5216c4adf Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 26 Oct 2011 01:05:59 +0100 Subject: [PATCH] markdown --- itf/settings.py | 1 + itf/static/js/insidepage.js | 1 + itf/templates/modules/bestpractices/bestpractice.html | 11 ++++++----- itf/templates/noel/insidepage.html | 2 +- requirements.txt | 1 + 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/itf/settings.py b/itf/settings.py index d4a5bb7..d29736e 100755 --- a/itf/settings.py +++ b/itf/settings.py @@ -145,6 +145,7 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.comments', + 'django.contrib.markup', 'registration', # 'itfcore', 'festival', diff --git a/itf/static/js/insidepage.js b/itf/static/js/insidepage.js index 6146a6c..fa07ce7 100755 --- a/itf/static/js/insidepage.js +++ b/itf/static/js/insidepage.js @@ -21,6 +21,7 @@ $('#listLeft ul li a').live("click", function() { var url = location.protocol + "//" + location.hostname + location.pathname + "?tab=" + $('.innerSelected').attr("data-slug") + "&object_id=" + objId; var fb_url = url.replace("&", "&"); $('#fb_like').attr("data-href", fb_url); + $('#permalinkBtn').attr("href", url); var searchTerm = $('.searchListField').val(); var html = data.html; if (searchTerm != '') { diff --git a/itf/templates/modules/bestpractices/bestpractice.html b/itf/templates/modules/bestpractices/bestpractice.html index 251b1af..45f2f8b 100755 --- a/itf/templates/modules/bestpractices/bestpractice.html +++ b/itf/templates/modules/bestpractices/bestpractice.html @@ -1,7 +1,8 @@ {% load thumbnail %} +{% load markup %}
{% for s in stories %} - Situation: {{ s.text|safe|linebreaksbr }} + Situation: {{ s.text|safe|markdown }} {% if s.image %} {% thumbnail s.image "164x114" crop="center" as im %} @@ -18,7 +19,7 @@
- Law: {{ law }} + Law: {{ law|markdown }} {% if law_image %} {% thumbnail law_image "164x114" crop="center" as im %} @@ -26,17 +27,17 @@ {% endif %}

{% if theatre %} - Spotlight on Theatre: {{ theatre|safe|linebreaksbr }}

+ Spotlight on Theatre: {{ theatre|safe|markdown }}

{% endif %} {% if quick_howto %} - Best Practices or Quick, Tell Me How to Avoid Conflict! {{ quick_howto|safe|linebreaksbr }}

+ Best Practices or Quick, Tell Me How to Avoid Conflict! {{ quick_howto|safe|markdown }}

{% endif %} {% if links %} Links:
{% for l in links %} {{ l.url }}
- {{ l.text|linebreaksbr }} + {{ l.text|markdown }}

{% endfor %} {% endif %} diff --git a/itf/templates/noel/insidepage.html b/itf/templates/noel/insidepage.html index c0c0388..7b021d2 100755 --- a/itf/templates/noel/insidepage.html +++ b/itf/templates/noel/insidepage.html @@ -183,7 +183,7 @@ - download + permalink diff --git a/requirements.txt b/requirements.txt index 6a24189..35f5d9a 100755 --- a/requirements.txt +++ b/requirements.txt @@ -14,3 +14,4 @@ django-ckeditor django-registration Whoosh django-haystack +Markdown