From 5e9a1b9846afe9f9c7238ad9fe2cd00383c869cf Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 06 2015 14:31:44 +0000 Subject: Drop un-used jinja filters --- diff --git a/progit/ui/filters.py b/progit/ui/filters.py index 963b59c..67c6c22 100644 --- a/progit/ui/filters.py +++ b/progit/ui/filters.py @@ -35,23 +35,6 @@ from progit import (APP, SESSION, LOG, __get_file_in_tree, cla_required, # Jinja filters -@APP.template_filter('hasattr') -def jinja_hasattr(obj, string): - """ Template filter checking if the provided object at the provided - string as attribute - """ - return hasattr(obj, string) - - -@APP.template_filter('lastcommit_date') -def lastcommit_date_filter(repo): - """ Template filter returning the last commit date of the provided repo. - """ - if not repo.is_empty: - commit = repo[repo.head.target] - return arrow.get(commit.commit_time).humanize() - - @APP.template_filter('humanize') def humanize_date(date): """ Template filter returning the last commit date of the provided repo. @@ -59,14 +42,6 @@ def humanize_date(date): return arrow.get(date).humanize() -@APP.template_filter('rst2html') -def rst2html(rst_string): - """ Template filter transforming rst text into html - """ - if rst_string: - return progit.doc_utils.convert_doc(unicode(rst_string)) - - @APP.template_filter('format_ts') def format_ts(string): """ Template filter transforming a timestamp to a date