Hi,

I'm having trouble understanding a certain aspect of webware/python. Here is what I'm trying to do.

Three files are involved: SitePage.py, View.py, View.psp (These aren't the real names.)

SitePage.py --> View.py --> View.psp
View.py inherits from SitePage and View.psp inherits from View.py. This allows me to put most of the logic in View.py and mostly html in View.psp. Below is what they look like.


SitePage.py -- nothing special -- works fine

View.py *******************************************
from lib.SitePage import SitePage

class View(SitePage):
   def __init__(self):
      SitePage.__init__(self)
      self.__stuff = self.request().field('sutff')
   def stuff(self):
      return self.__stuff


View.psp ****************************************** <[EMAIL PROTECTED] extents="testlet"%> <[EMAIL PROTECTED] method="writeContent"%> <%=self.test()%> <div> lots of good html </div>


The error I get looks like this:


AttributeError: _home_randall_pyrocks_MyContext_real_estate_psp_ba instance has no attribute '_request'

Why can't I access the request object this way? Is (def writeContent: ) the only way to access request, etc. ?

I'm still trying to understand how webware works. Answers or references to docs are appreciated.

Thanks.

Randall



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to