I wrote:
> I'll trade you better Tool docs for better TW docs. ;) I'm a bit lost
> on how the various components actually work: who calls whom when.
and Alberto replied:
> Are you meaning TG or TW?, if the later (toscawidgets) I think
> discussing it's docs deserves another thread... ;)
Yes, I meant toscawidgets. Another thread is fine.
Later, I wrote:
> I would be quite interested in folding any such app_factory interface
> back into CherryPy itself. I think this is an area where we can
> co-develop quite well. For example, could this be solved by having the
> CherryPy Application class grow a new app_factory (class)method?
...and Alberto replied:
> Hmm, only if entry_points can be made to point to a classmethod
> which I believe they can't...
That's OK. An instancemethod could be equally helpful:
class Application(object):
...
def factory(self, global_conf, **local_conf):
self.merge(local_conf)
return self
----
Then, in your TG app code:
app = cherrypy.tree.mount(root, "/", conf)
----
And in the paste config file:
paste.app_factory = mymodule.app.factory
> However, I think CP3 quite well supports being wrapped in an app
> factory as it stands right now. I would rather have the app factory
> under the application developer's control (editable in his own app's
> source) because it's a (another) great place to "manually" stack
> middleware, dispatchers... and do any sort of stuff that should occur
> only once in the app's lifetime.
Fair enough. But it would be nice to have it work by default.
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---