[Mpuls-commits] r1241 - in wasko/branches/2.0: . mpulsweb/lib mpulsweb/lib/helper waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Feb 4 12:44:53 CET 2010


Author: torsten
Date: 2010-02-04 12:44:51 +0100 (Thu, 04 Feb 2010)
New Revision: 1241

Added:
   wasko/branches/2.0/mpulsweb/lib/helper/
   wasko/branches/2.0/mpulsweb/lib/helper/__init__.py
   wasko/branches/2.0/mpulsweb/lib/helper/filters.py
Removed:
   wasko/branches/2.0/waskaweb/lib/filters.py
Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/lib/helpers.py
Log:


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-02-04 11:42:52 UTC (rev 1240)
+++ wasko/branches/2.0/ChangeLog	2010-02-04 11:44:51 UTC (rev 1241)
@@ -14,8 +14,17 @@
 	for a completely new case.
 
 2010-02-04  Torsten Irländer <torsten.irlaender at intevation.de>
-	
 
+	Moved lib/filters to base
+
+	* mpulsweb/lib/helper
+	  mpulsweb/lib/helper/__init__.py: Added new folder for helper libs
+	* waskaweb/lib/filters.py,
+	  mpulsweb/lib/helper/filters.py: Moved file
+	* waskaweb/lib/helpers.py: Adopted import
+
+2010-02-04  Torsten Irländer <torsten.irlaender at intevation.de>
+
 	* waskaweb/lib/navigation.py: (FileCache): Moved from lib/filecache as
 	it is only used here.
 	* waskaweb/lib/filecace.py: Deleted. Not imported anywhere anymore.

Added: wasko/branches/2.0/mpulsweb/lib/helper/__init__.py
===================================================================

Copied: wasko/branches/2.0/mpulsweb/lib/helper/filters.py (from rev 1211, wasko/branches/2.0/waskaweb/lib/filters.py)


Property changes on: wasko/branches/2.0/mpulsweb/lib/helper/filters.py
___________________________________________________________________
Name: svn:mergeinfo
   + 

Deleted: wasko/branches/2.0/waskaweb/lib/filters.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/filters.py	2010-02-04 11:42:52 UTC (rev 1240)
+++ wasko/branches/2.0/waskaweb/lib/filters.py	2010-02-04 11:44:51 UTC (rev 1241)
@@ -1,59 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# 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).
-# 
-# mpuls WASKA is free software: you can redistribute it and/or modify it under
-# the terms of the GNU Affero General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-# 
-# mpuls WASKA is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
-# License for more details.
-# 
-# You should have received a copy of the GNU Affero General Public
-# License along with mpuls WASKA. If not, see <http://www.gnu.org/licenses/>.
-# 
-# mpuls WASKA has been developed on behalf of the 
-# Projekttraeger im Deutschen Zentrum fuer Luft- und Raumfahrt e.V. (PT-DLR)
-# within the programme Kompetenzagenturen (Durchfuehrungsphase) funded by
-# the Bundesministerium fuer Familie, Senioren, Frauen und Jugend and 
-# European Social Fund resources.
-#
-# Authors:
-# Sascha L. Teichmann <teichmann at intevation.de>
-#
-
-from cgi import escape
-
-def no_none(text):
-    if text == 'None' or text == u'None' or not text:
-        return ''
-    return text
-
-def NA(text):
-    if text == 'None' or text == u'None' or text == '' or text == u'':
-        return '-/-'
-    return text
-
-def H(text):
-    return escape(text, True)
-
-def shorten(text, length=40):
-    shortcut = "..."
-    if len(text) > length:
-        text = text[0:length-len(shortcut)] + shortcut 
-    return text
-
-def nl_to_br(text):
-    """Replace newlines in text with <br> tags"""
-    text = text.replace('\r\n', '<br>')
-    text = text.replace('\n', '<br>')
-    text = text.replace('\r', '<br>')
-    return text
-
-# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: wasko/branches/2.0/waskaweb/lib/helpers.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/helpers.py	2010-02-04 11:42:52 UTC (rev 1240)
+++ wasko/branches/2.0/waskaweb/lib/helpers.py	2010-02-04 11:44:51 UTC (rev 1241)
@@ -47,7 +47,7 @@
 from mpulsweb.lib.security import hasRole, getKAName
 
 from mpulsweb.lib.navigation import get_pagename, render_navigation
-from waskaweb.lib.filters import shorten, nl_to_br
+from mpulsweb.lib.helper.filters import shorten, nl_to_br
 
 
 PRINTABLE = frozenset(printable)



More information about the Mpuls-commits mailing list