>
>
> On Wednesday 04 November 2015 10:43 PM, Avraham Serour wrote: 
> So I have to use a client connection object such as Python request 
> So I want to keep it as global, so that all views can access it from a 
> single location, instead of creating a client request instance for every 
> view on every call. 
>

Just cache the result and call remote when cache is timed out / 
invalidated. 
Or load remote data using separate view, as a proxy, and call it from js, 
for example. 
Or do both.
 
Do not rely on sharing any instances between threads/processes. Views 
should be stateless.
  
BR,
Marcin.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/558bea8b-238c-47f2-ba64-54d77a40b815%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to