[damned-lies] Add forgotten files from previous commit
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Add forgotten files from previous commit
- Date: Fri, 18 Jan 2013 17:26:23 +0000 (UTC)
commit 57c46f89414b739989fdec626c67285660fb1295
Author: Claude Paroz <claude 2xlibre net>
Date: Fri Jan 18 18:26:10 2013 +0100
Add forgotten files from previous commit
people/templatetags/people.py | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/people/templatetags/__init__.py b/people/templatetags/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/people/templatetags/people.py b/people/templatetags/people.py
new file mode 100644
index 0000000..780d27f
--- /dev/null
+++ b/people/templatetags/people.py
@@ -0,0 +1,15 @@
+from django import template
+from django.utils.safestring import mark_safe
+from django.utils.translation import ugettext as _
+
+register = template.Library()
+
+ register filter
+def people_list(lst):
+ """
+ Format a people list, with clickable person name.
+ """
+ # Translators: string used as separator in person list
+ result = _(", ").join('<a href="%s">%s</a>' % (pers.get_absolute_url(), pers.name)
+ for pers in lst)
+ return mark_safe(result)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]