I'm trying to create a Pluggable Brain so I can incorporate various functions involving employees from my ZSQL Method. This is the SQL code: SELECT StaffId, empfirstn, emplastn, nickname, extension, initials FROM tblHRPersonnel INNER JOIN tblS4Emp ON tblHRPersonnel.empidno = tblS4Emp.empidno WHERE tblS4Emp.empactive='Y' AND tblHRPersonnel.FilterOutofWeb=False ORDER BY tblS4Emp.emplastn; This is the Employee.py file in the Extensions folder: """Employee class for extra innformation""" class Employee: def fullName(self): """Returns full name for employee using nickname if any""" if self.nickname: return self.nickname + ' ' + self.emplastn else: return self.empfirstn + ' ' + self.emplastn This is the error: Traceback (innermost last): File e:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 223, in publish_module File e:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 187, in publish File e:\Program Files\Zope\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: ActiveStaff) File e:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 171, in publish File e:\Program Files\Zope\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: manage_advanced) File e:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: manage_advanced) File E:\Program Files\zope\lib\python\Shared\DC\ZRDB\DA.py, line 299, in manage_advanced (Object: ActiveStaff) File E:\Program Files\zope\lib\python\App\Extensions.py, line 238, in getBrain File E:\Program Files\zope\lib\python\App\Extensions.py, line 217, in getObject (Info: ('e:\\Program Files\\Zope\\Extensions\\Employee.py', 'Employee')) SyntaxError: (see above)
Suggest you try: python Employee.py in the extensions directory and see if you get better information cheaper. At 11:54 07/08/01 -0700, Montagne, Michael wrote:
I'm trying to create a Pluggable Brain so I can incorporate various functions involving employees from my ZSQL Method.
<snip>
This is the Employee.py file in the Extensions folder: """Employee class for extra innformation""" class Employee: def fullName(self): """Returns full name for employee using nickname if any""" if self.nickname: return self.nickname + ' ' + self.emplastn else: return self.empfirstn + ' ' + self.emplastn
<snip>
participants (2)
-
J. Cone -
Montagne, Michael