Re: global variables in stateless applications (was "Generating dynamic csv data")

2009-03-03 Thread GP
Tim, Thanks for your tip, I was able to maintain the correct value in the current session and retrieve it in the next request as you had suggested. This solved the issue of two different clients hitting the server as they have unique session_keys. An exception here is if I have two browsers open

Re: global variables in stateless applications (was "Generating dynamic csv data")

2009-03-03 Thread GP
> This is bound to fail when user A hits view #1, then user B hits > view #1 (overwriting A's global), then user A hits view #2, > seeing B's results. Yep, figured that out the hard way > your views should be fairly stateless, relying only on > information coming from the user -- whether stored

Re: Generating dynamic csv data

2009-03-03 Thread Alex Gaynor
On Tue, Mar 3, 2009 at 12:54 PM, GP wrote: > > > What you want to do is abstract the machinery that creates the queryset > into > > a seperate function, that way you can take the GET vars in both functions > > and get a queryset from them. FWIW I've been working on a project to do > > something

Re: Generating dynamic csv data

2009-03-03 Thread GP
> What you want to do is abstract the machinery that creates the queryset into > a seperate function, that way you can take the GET vars in both functions > and get a queryset from them.  FWIW I've been working on a project to do > something similar here:http://github.com/alex/django-filter/tree/m

Re: Generating dynamic csv data

2009-03-03 Thread Alex Gaynor
On Tue, Mar 3, 2009 at 2:00 AM, GP wrote: > > I have a view which generates a table (table_view) of the most recent > entries entered in the Test table of the database. I have the option > of querying the database and render the table based on the user > criteria as well > > Something like this:

Re: global variables in stateless applications (was "Generating dynamic csv data")

2009-03-03 Thread Tim Chase
GP wrote: > I have a view which generates a table (table_view) of the most recent > entries entered in the Test table of the database. I have the option > of querying the database and render the table based on the user > criteria as well > > Something like this: tests = Test.objects.filter(field1

Generating dynamic csv data

2009-03-02 Thread GP
I have a view which generates a table (table_view) of the most recent entries entered in the Test table of the database. I have the option of querying the database and render the table based on the user criteria as well Something like this: tests = Test.objects.filter(field1 = ...) The searc