I'm getting confused and I'm hoping maybe someone can clarify this for me. Here's what I'd ideally like to achieve in terms of code organization:

app_work_dir/lib/myapp
    root of python package hierarchy for myapp

app_work_dir/lib/myapp/model
    business logic classes, reusable in non-Webware situations

app_work_dir/lib/myapp/webui
    abstract servlets that don't generate content, only hold shared code

app_work_dir/lib/myapp/webui/templates
    compiled cheetah templates used by servlets

app_work_dir/webware_context
my context root, where my servlets live. Servlets inherit from stuff in the "myapp.webui" package, and also import and instantiate templates from "myapp.webui.templates"



I'm having two problems getting this running. First, ideally, I'd like my urls to start "/wk/myapp". However, I've noticed that webware makes "myapp" into a module, so it confilcts with the "myapp" under the lib directory, and if I try to do "import myapp.webui" I get no such module. I'm willing to rename my context module, though if necessary.


The second one is even if a pick a unique name for my context, I am having problems. Specifically, I get this error:

Traceback (most recent call last):
  File "./WebKit/Application.py", line 415, in dispatchRequest
  File "./WebKit/Application.py", line 563, in handleGoodURL
  File "./WebKit/Application.py", line 1047, in createServletInTransaction
  File "./WebKit/Application.py", line 990, in getServlet
  File "./WebKit/ServletFactory.py", line 197, in servletForTransaction
AssertionError


when I access this url: "/wk/myappnewname/home"



Here is my "home" servlet: -------------------------------- from myapp.webui import baseservlet

class home(baseservlet):
    pass
----------------------------------



My class "baseservlet" extends WebKit.Page. It fails this assertion:

assert type(theClass) is ClassType \
or isinstance(theClass, type)


Any advice?


Thank you,

Pete



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to