From ed3d74e61300f91818eeff9dad7e9d35c556f75a Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Tue, 24 Jun 2014 16:39:42 +0800 Subject: Added app schedule, tools and archive/templatetags; updated settings. * Added app 'schedule' to provides a more generic schedule page * Added fake app 'tools' to holds generic utilities * Moved notice/templatetags to tools/templatetags * Small change to archive.models.Archive display format * Added archive/templatetags * Small update to introduction page --- notice/templatetags/__init__.py | 0 notice/templatetags/my_markdown.py | 26 -------------------------- 2 files changed, 26 deletions(-) delete mode 100644 notice/templatetags/__init__.py delete mode 100644 notice/templatetags/my_markdown.py (limited to 'notice') diff --git a/notice/templatetags/__init__.py b/notice/templatetags/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/notice/templatetags/my_markdown.py b/notice/templatetags/my_markdown.py deleted file mode 100644 index 842f72f..0000000 --- a/notice/templatetags/my_markdown.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -implement my own 'markdown' template tag -requires 'python-markdown' (pip install markdown) -""" -# ref: http://www.dominicrodger.com/django-markdown.html - -import markdown - -from django import template -from django.template.defaultfilters import stringfilter -from django.utils.encoding import force_unicode -from django.utils.safestring import mark_safe - -register = template.Library() - -@register.filter(is_safe=True) -@stringfilter -def my_markdown(value): - extensions = ["nl2br", ] - - return mark_safe(markdown.markdown(force_unicode(value), - extensions, - safe_mode=True, - enable_attributes=False)) -- cgit v1.2.2