On Tue, Jun 29, 2010 at 19:38, Tejaswi <[email protected]> wrote:
> I have the following code that does a simple hello wolrd app using
> webpy. For each call to the GET method, the class Dashboards
> "__init__" method gets called. Is there a way to change the behavior
> to let __init__ be called only once? I have some expensive setup
> methods in __init__ and I don't want them getting called for each call
> to GET.

...

>
> I am sure there is something rudimentary that I am missing. Hope
> someone here can help me. I tried searching on the groups and on the
> webpy site for info. But no luck still.
>

probably easiest would be to move the code in your init to something
that's kept alive past multiple calls, like session or similar.  and
then just check it for being init'd and if not then obviously do the
necesary tasks to init it.

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en.

Reply via email to