[Mpuls-commits] r834 - in wasko/branches/2.0: . waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jan 25 16:31:15 CET 2010
Author: bh
Date: 2010-01-25 16:31:14 +0100 (Mon, 25 Jan 2010)
New Revision: 834
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/waskaweb/lib/filters.py
Log:
* waskaweb/lib/filters.py (nl_to_br): New. filter to convert
newlines to HTML <br> tags
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-01-25 15:30:06 UTC (rev 833)
+++ wasko/branches/2.0/ChangeLog 2010-01-25 15:31:14 UTC (rev 834)
@@ -1,5 +1,10 @@
2010-01-25 Bernhard Herzog <bh at intevation.de>
+ * waskaweb/lib/filters.py (nl_to_br): New. filter to convert
+ newlines to HTML <br> tags
+
+2010-01-25 Bernhard Herzog <bh at intevation.de>
+
* waskaweb/model/case.py: Remove unused SQL templates.
2010-01-22 Bernhard Herzog <bh at intevation.de>
Modified: wasko/branches/2.0/waskaweb/lib/filters.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/filters.py 2010-01-25 15:30:06 UTC (rev 833)
+++ wasko/branches/2.0/waskaweb/lib/filters.py 2010-01-25 15:31:14 UTC (rev 834)
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# Copyright 2007, 2008 Intevation GmbH, Germany, <info at intevation.de>
+# Copyright 2007, 2008, 2010 Intevation GmbH, Germany, <info at intevation.de>
#
# This file is part of mpuls WASKA (CoMPUter-based case fiLeS -
# Web-Anwendungs-Server fuer Kompetenzagenturen).
@@ -48,4 +48,8 @@
text = text[0:length] + "..."
return text
+def nl_to_br(text):
+ """Replace newlines in text with <br> tags"""
+ return text.replace('\n', '<br>')
+
# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
More information about the Mpuls-commits
mailing list