Answering my own question: yes, it appears that it works, as long as each view function that uses the client variable says "global client".
This brings up another question, concerning concurrency. I haven't yet decided on whether the app will use processes or threads (probably have to test both approaches, I guess). The backend is a legacy key- value data store without DB-level auto increment functionality, but each item of data that goes in there must have a unique ID. I'm thinking of storing this ID as a simple key-value pair in the data store, incrementing it each time a data addition view is called and then saving the actual data with the just-incremented-and-then- retrieved ID. My knowledge in this area is severely limited, but this smells like a possible threading problem, with the possibility of two or more threads saving data with the same ID value. (Admittedly this is going into general Python territory at this point, not really Django- specific). Googling has revealed quite a bunch of different methods of locking, queuing etc. when dealing with threads, but I don't know which method is suitable for my purposes. And what if I elect to use processes instead? They would share the same data store as well, so what would be the preferred method of synchronizing them? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---