# HG changeset patch # User Brian Neal # Date 1377392892 18000 # Node ID 216f06267e2da74fb65eec19268d6f2deeebdd7a # Parent a75554eb6bae026eddb79fb939188edabea456de For Django 1.5: Remove all references to django.contrib.markup. This amounted to deleting some old templates, removing the app from INSTALLED_APPS, and doing some cleanup in core.markup. diff -r a75554eb6bae -r 216f06267e2d core/markup.py --- a/core/markup.py Fri Aug 23 19:40:01 2013 -0500 +++ b/core/markup.py Sat Aug 24 20:08:12 2013 -0500 @@ -15,17 +15,11 @@ Currently, we only have to worry about Markdown 1.6b and 2.0. """ def __init__(self, safe_mode='escape'): - # Unicode support only in markdown v1.7 or above. Version_info - # exists only in markdown v1.6.2rc-2 or above. - self.unicode_support = getattr(_markdown, "version_info", None) >= (1, 7) self.md = _markdown.Markdown(safe_mode=safe_mode, extensions=['urlize', 'nl2br', 'del']) def convert(self, s): - if self.unicode_support: - return self.md.convert(force_unicode(s)) - else: - return force_unicode(self.md.convert(s)) + return self.md.convert(force_unicode(s)) def markdown(s): diff -r a75554eb6bae -r 216f06267e2d sg101/settings/base.py --- a/sg101/settings/base.py Fri Aug 23 19:40:01 2013 -0500 +++ b/sg101/settings/base.py Sat Aug 24 20:08:12 2013 -0500 @@ -106,7 +106,6 @@ 'django.contrib.contenttypes', 'django.contrib.flatpages', 'django.contrib.humanize', - 'django.contrib.markup', 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.sites', diff -r a75554eb6bae -r 216f06267e2d sg101/templates/bio/markdown.html --- a/sg101/templates/bio/markdown.html Fri Aug 23 19:40:01 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -{% load markup %} -{% load smiley_tags %} -{{ data|markdown:"safe"|smilify }} diff -r a75554eb6bae -r 216f06267e2d sg101/templates/forums/post.html --- a/sg101/templates/forums/post.html Fri Aug 23 19:40:01 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -{% load markup %} -{% load smiley_tags %} -{{ data|markdown:"safe"|smilify }} diff -r a75554eb6bae -r 216f06267e2d sg101/templates/gcalendar/markdown.html --- a/sg101/templates/gcalendar/markdown.html Fri Aug 23 19:40:01 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -{% load markup %} -{{ data|markdown:"safe" }}