Skip to content

Commit 86a6c90

Browse files
author
Richard Jones
committed
Use the csv module for generating the form entry so it's correct.
[also noted the sf.net feature request id in the change log]
1 parent 50ce7a8 commit 86a6c90

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

CHANGES.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Feature:
88
better configuration system.
99
. Alternate email addresses are now available for users. See the MIGRATION
1010
file for info on how to activate the feature.
11-
. Added simple editing for classes that don't define a templated interface.
11+
. #511168 ] Web interface: Adding new products
12+
Classes that don't provide template html get a default edit interface now:
1213
- access using the admin "class list" interface
1314
- limited to admin-only
1415
- requires the csv module from object-craft (url given if it's missing)

roundup/cgi_client.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: cgi_client.py,v 1.103 2002-02-20 05:05:28 richard Exp $
18+
# $Id: cgi_client.py,v 1.104 2002-02-20 05:45:17 richard Exp $
1919

2020
__doc__ = """
2121
WWW request handler (also used in the stand-alone server).
@@ -371,12 +371,13 @@ def basicClassEditPage(self):
371371
w('</tt>')
372372

373373
w('<form onSubmit="return submit_once()" method="POST">')
374-
w('<textarea name="rows" cols=80 rows=15>')
374+
w('<textarea name="rows" cols=80 rows=15>')
375+
p = csv.parser()
375376
for nodeid in cl.list():
376377
l = []
377378
for name in props:
378379
l.append(cgi.escape(str(cl.get(nodeid, name))))
379-
w(', '.join(l) + '\n')
380+
w(p.join(l) + '\n')
380381

381382
w(_('</textarea><br><input type="submit" value="Save Changes"></form>'))
382383

@@ -1287,6 +1288,12 @@ def parsePropsFromForm(db, cl, form, nodeid=0):
12871288

12881289
#
12891290
# $Log: not supported by cvs2svn $
1291+
# Revision 1.103 2002/02/20 05:05:28 richard
1292+
# . Added simple editing for classes that don't define a templated interface.
1293+
# - access using the admin "class list" interface
1294+
# - limited to admin-only
1295+
# - requires the csv module from object-craft (url given if it's missing)
1296+
#
12901297
# Revision 1.102 2002/02/15 07:08:44 richard
12911298
# . Alternate email addresses are now available for users. See the MIGRATION
12921299
# file for info on how to activate the feature.

0 commit comments

Comments
 (0)