On Oct 3, 6:12 am, Ian Lewis <ianmle...@gmail.com> wrote:

> Other frameworks seem have View/Handler instances per request, such as
> appengine's webapp so there is some precedent for creating an instance
> per request.
>
> http://code.google.com/appengine/docs/python/gettingstarted/handlingf...
>
> Flask seems to do it the callable singleton way:
>
> http://flask.pocoo.org/docs/patterns/lazyloading/
>
> Is there any precedent in other frameworks for doing it the singleton
> way? Talking a bit about how other frameworks/libraries do this might
> be a good idea to figure out what Joe User is likely to do.

>From a brief look at Pylons, it also creates an instance per request:
"These requests result in a new instance of the WSGIController being
created, which is then called with the dict options from the Routes
match." (http://pylonshq.com/docs/en/1.0/controllers/). No mentioning
about setting state on self and no __init__ on controllers (even the
base WSGIController doesn't define __init__).

George

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to