Hi, I have a problem about TypeError.
Here are my error respone:
The server encountered an unexpected condition which prevented it from
fulfilling the request.
Page handler: <unbound method WotktimeController.index>
Traceback (most recent call last):
File "c:\python25\lib\site-packages\cherrypy-2.2.1-py2.5.egg\cherrypy
\_cphttptools.py", line 105, in _run
self.main()
File "c:\python25\lib\site-packages\cherrypy-2.2.1-py2.5.egg\cherrypy
\_cphttptools.py", line 254, in main
body = page_handler(*virtual_path, **self.params)
TypeError: unbound method index() must be called with
WotktimeController instance as first argument (got nothing instead)
-------------------------------------------------------
My controller part right here:
class WotktimeController(identity.SecureResource):
require = identity.not_anonymous()
@tg.expose()
def index(self, worktime_id):
worktime_id = self._active_worktime_id()
return self.worktime(worktime_id)
@tg.expose(template="whatwhat.templates.worktime.work_daily")
@tg.validate(validators=dict(worktime_id=validators.Int()))
def worktime(self, worktime_id):
worktime = Worktime.get(worktime_id)
user_person = Person.get(identity.current.user.id)
groupids = utils.getGroups()
cherrypy.response.simpleCookie['active_worktime_id'] =
worktime_id
cherrypy.response.simpleCookie['active_worktime_id']['path'] =
'/'
people = Person.select(orderBy='displayName')
return dict(active_section='worktime',
worktime=worktime,
chance_codes=chance_codes,
impact_codes=impact_codes,
status_codes=status_codes,
people=people,
user_person=user_person,
groupids=groupids)
Why it can't identify the path I point to?
I DON'T GET IT.... I do really need some advice....
Thanks your reading. Thanks....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---