summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1f0f2ef)
raw | patch | inline | side by side (parent: 1f0f2ef)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 14 Oct 2001 10:55:00 +0000 (10:55 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 14 Oct 2001 10:55:00 +0000 (10:55 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@302 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/cgi_client.py | patch | blob | history | |
roundup/htmltemplate.py | patch | blob | history |
diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py
index d4cdaf5891a4cd802acf8ba8968a44d9bf87e1cd..223a7866786463644fad08664cfef9d1639494e9 100644 (file)
--- a/roundup/cgi_client.py
+++ b/roundup/cgi_client.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: cgi_client.py,v 1.30 2001-10-09 07:38:58 richard Exp $
+# $Id: cgi_client.py,v 1.31 2001-10-14 10:55:00 richard Exp $
import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes
import base64, Cookie, time
except IndexError:
raise NotFound
try:
- getattr(self, 'show%s'%self.classname)()
+ func = getattr(self, 'show%s'%self.classname)
except AttributeError:
raise NotFound
+ func()
return
m = nre.match(path[0])
if m:
self.classname = m.group(1)
try:
- getattr(self, 'new%s'%self.classname)()
+ func = getattr(self, 'new%s'%self.classname)
except AttributeError:
raise NotFound
+ func()
return
self.classname = path[0]
try:
#
# $Log: not supported by cvs2svn $
+# Revision 1.30 2001/10/09 07:38:58 richard
+# Pushed the base code for the extended schema CGI interface back into the
+# code cgi_client module so that future updates will be less painful.
+# Also removed a debugging print statement from cgi_client.
+#
# Revision 1.29 2001/10/09 07:25:59 richard
# Added the Password property type. See "pydoc roundup.password" for
# implementation details. Have updated some of the documentation too.
index 2bfa2b508ba72cabc3897658cda66f7d6d57ba83..8faff5b34051808f29348d74cf898262db663a71 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.25 2001-10-09 07:25:59 richard Exp $
+# $Id: htmltemplate.py,v 1.26 2001-10-14 10:55:00 richard Exp $
import os, re, StringIO, urllib, cgi, errno
value = self.cl.get(self.nodeid, property)
else:
if isinstance(propclass, hyperdb.Multilink): value = []
+ elif isinstance(propclass, hyperdb.Link): value = None
else: value = ''
if isinstance(propclass, hyperdb.Link):
linkname = propclass.classname
- if value is None:
- return '[not assigned]'
+ if value is None: return '[no %s]'%property.capitalize()
linkcl = self.db.classes[linkname]
k = linkcl.labelprop()
linkvalue = linkcl.get(value, k)
linkname = propclass.classname
linkcl = self.db.classes[linkname]
k = linkcl.labelprop()
+ if not value : return '[no %s]'%property.capitalize()
l = []
for value in value:
linkvalue = linkcl.get(value, k)
l.append('<a href="%s%s">%s</a>'%(linkname, value, linkvalue))
return ', '.join(l)
+ if isinstance(propclass, hyperdb.String):
+ if value == '': value = '[no %s]'%property.capitalize()
return '<a href="%s%s">%s</a>'%(self.classname, self.nodeid, value)
class Count(Base):
#
# $Log: not supported by cvs2svn $
+# Revision 1.25 2001/10/09 07:25:59 richard
+# Added the Password property type. See "pydoc roundup.password" for
+# implementation details. Have updated some of the documentation too.
+#
# Revision 1.24 2001/09/27 06:45:58 richard
# *gak* ... xmp is Old Skool apparently. Am using pre again by have the option
# on the plain() template function to escape the text for HTML.