Re: [Zope] LoginManager dlpierson example
I just realized that I responded in terms of a PythonMethod when you asked about a PythonScript. My ZClass functions for my LoginManager subclass are all PythonMethods, yet to be converted to Python Scripts. My 'authenticate' method takes (self, password, request) as parameters and has for the function body only return password == self.password I suspect that an equivalent PythonScript will need to take password and request as parameters (not so sure about 'request') and will have a body like this: return password == container.password Ah, what the heck... OK, I just converted my authenticate script as above and it seems to still work fine. On Wed, Jan 31, 2001 at 07:32:14PM +1300, W. Robert Kellock wrote: > On passing 'request' (why the extra argument anyway?) I got > > Error Type: TypeError > Error Value: not enough arguments; expected 3, got 2 > > so I'm wondering have you got LoginManager to work on the Zope 2.3.0 release? -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] LoginManager dlpierson example
Thanks Fred, On passing 'request' (why the extra argument anyway?) I got Error Type: TypeErrorError Value: not enough arguments; expected 3, got 2 so I'm wondering have you got LoginManager to work on the Zope 2.3.0 release? >>On Wed, Jan 31, 2001 at 09:25:08AM +1300, W. Robert Kellock wrote:>> Are PythonScript arguments typeless? I keep getting an>> error>> >> Error Type: AttributeError>> Error Value: 'string' object has no attribute 'password'>> >> from the authenticate method which I'm passing self,password.>I think you should pass (self, password, request).>-- >Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312>Principal Consultant www.OntoSys.com fax: +1.630.879.1370>OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA -W.Robert Kellock Ph: +64 3 326 6115Sales Manager Fax: +64 3 326 6115Credit Systems Control Ltd Web: www.creditscore.co.nz "making decisions easy"-
Re: [Zope] LoginManager dlpierson example
On Wed, Jan 31, 2001 at 09:25:08AM +1300, W. Robert Kellock wrote: > Are PythonScript arguments typeless? I keep getting an > error > > Error Type: AttributeError > Error Value: 'string' object has no attribute 'password' > > from the authenticate method which I'm passing self,password. I think you should pass (self, password, request). -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )