summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 54422fa)
raw | patch | inline | side by side (parent: 54422fa)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 31 Oct 2001 06:24:35 +0000 (06:24 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 31 Oct 2001 06:24:35 +0000 (06:24 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@351 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/htmltemplate.py | patch | blob | history |
index 6f77a9e38104339be24a8d37fd250723f7d4ebc5..46a2111e8b6196e17cb9919b98a5b9bdc5e646d6 100644 (file)
--- a/roundup/htmltemplate.py
+++ b/roundup/htmltemplate.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: htmltemplate.py,v 1.36 2001-10-28 22:51:38 richard Exp $
+# $Id: htmltemplate.py,v 1.37 2001-10-31 06:24:35 richard Exp $
import os, re, StringIO, urllib, cgi, errno
import hyperdb, date, password
+# This imports the StructureText functionality for the do_stext function
+# get it from http://dev.zope.org/Members/jim/StructuredTextWiki/NGReleases
+try:
+ from StructuredText.StructuredText import HTML as StructuredText
+except ImportError:
+ StructuredText = None
+
+
class TemplateFunctions:
def __init__(self):
self.form = None
return cgi.escape(value)
return value
+ def do_stext(self, property, escape=0):
+ '''Render as structured text using the StructuredText module
+ (see above for details)
+ '''
+ s = self.do_plain(property, escape=escape)
+ if not StructuredText:
+ return s
+ return StructuredText(s,level=1,header=0)
+
def do_field(self, property, size=None, height=None, showid=0):
''' display a property like the plain displayer, but in a text field
to be edited
#
# $Log: not supported by cvs2svn $
+# Revision 1.36 2001/10/28 22:51:38 richard
+# Fixed ENOENT/WindowsError thing, thanks Juergen Hermann
+#
# Revision 1.35 2001/10/24 00:04:41 richard
# Removed the "infinite authentication loop", thanks Roch'e
#