📄 freshcvs.3
字号:
Return-Path: <twisted-commits-admin@twistedmatrix.com>Delivered-To: warner-twistedcvs@luther.lothar.comReceived: (qmail 32220 invoked by uid 1000); 14 Jan 2003 21:50:04 -0000Delivered-To: warner-twistedcvs@lothar.comReceived: (qmail 7923 invoked by uid 13574); 14 Jan 2003 21:49:48 -0000Received: from unknown (HELO pyramid.twistedmatrix.com) ([64.123.27.105]) (envelope-sender <twisted-commits-admin@twistedmatrix.com>) by 130.94.181.6 (qmail-ldap-1.03) with SMTP for <warner-twistedcvs@lothar.com>; 14 Jan 2003 21:49:48 -0000Received: from localhost ([127.0.0.1] helo=pyramid.twistedmatrix.com) by pyramid.twistedmatrix.com with esmtp (Exim 3.35 #1 (Debian)) id 18YYr0-0005en-00; Tue, 14 Jan 2003 15:44:14 -0600Received: from acapnotic by pyramid.twistedmatrix.com with local (Exim 3.35 #1 (Debian)) id 18YYq7-0005eQ-00 for <twisted-commits@twistedmatrix.com>; Tue, 14 Jan 2003 15:43:19 -0600To: twisted-commits@twistedmatrix.comFrom: itamarst CVS <itamarst@twistedmatrix.com>Reply-To: twisted-python@twistedmatrix.comX-Mailer: CVSToysFrom: itamarst CVS <itamarst@twistedmatrix.com>Reply-To: twisted-python@twistedmatrix.comMessage-Id: <E18YYq7-0005eQ-00@pyramid.twistedmatrix.com>Subject: [Twisted-commits] submit formmethod now subclass of ChoiceSender: twisted-commits-admin@twistedmatrix.comErrors-To: twisted-commits-admin@twistedmatrix.comX-BeenThere: twisted-commits@twistedmatrix.comX-Mailman-Version: 2.0.11Precedence: bulkList-Help: <mailto:twisted-commits-request@twistedmatrix.com?subject=help>List-Post: <mailto:twisted-commits@twistedmatrix.com>List-Subscribe: <http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-commits>, <mailto:twisted-commits-request@twistedmatrix.com?subject=subscribe>List-Id: <twisted-commits.twistedmatrix.com>List-Unsubscribe: <http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-commits>, <mailto:twisted-commits-request@twistedmatrix.com?subject=unsubscribe>List-Archive: <http://twistedmatrix.com/pipermail/twisted-commits/>Date: Tue, 14 Jan 2003 15:43:19 -0600Status: Modified files:Twisted/twisted/web/woven/form.py 1.20 1.21Twisted/twisted/python/formmethod.py 1.12 1.13Log message:submit formmethod now subclass of ChoiceIndex: Twisted/twisted/web/woven/form.pydiff -u Twisted/twisted/web/woven/form.py:1.20 Twisted/twisted/web/woven/form.py:1.21--- Twisted/twisted/web/woven/form.py:1.20 Tue Jan 14 12:07:29 2003+++ Twisted/twisted/web/woven/form.py Tue Jan 14 13:43:16 2003@@ -140,8 +140,8 @@ def input_submit(self, request, content, arg): div = content.div()- for value in arg.buttons:- div.input(type="submit", name=arg.name, value=value)+ for tag, value, desc in arg.choices:+ div.input(type="submit", name=arg.name, value=tag) div.text(" ") if arg.reset: div.input(type="reset")Index: Twisted/twisted/python/formmethod.pydiff -u Twisted/twisted/python/formmethod.py:1.12 Twisted/twisted/python/formmethod.py:1.13--- Twisted/twisted/python/formmethod.py:1.12 Tue Jan 14 12:07:30 2003+++ Twisted/twisted/python/formmethod.py Tue Jan 14 13:43:17 2003@@ -180,19 +180,13 @@ return 1 -class Submit(Argument):+class Submit(Choice): """Submit button or a reasonable facsimile thereof.""" - def __init__(self, name, buttons=["Submit"], reset=0, shortDesc=None, longDesc=None):- Argument.__init__(self, name, shortDesc=shortDesc, longDesc=longDesc)- self.buttons = buttons+ def __init__(self, name, choices=[("Submit", "submit", "Submit form")],+ reset=0, shortDesc=None, longDesc=None):+ Choice.__init__(self, name, choices=choices, shortDesc=shortDesc, longDesc=longDesc) self.reset = reset-- def coerce(self, val):- if val in self.buttons:- return val- else:- raise InputError, "no such action" class PresentationHint:._______________________________________________Twisted-commits mailing listTwisted-commits@twistedmatrix.comhttp://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-commits
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -