Re: Serialize QuerySet Q (not the result)

2015-04-22 Thread Tom Evans
On Wed, Apr 22, 2015 at 10:27 AM, Jani Tiainen wrote: > Hi, > > Straight from the docs: > > https://docs.djangoproject.com/en/1.8/ref/models/querysets/#pickling-querysets > > "If you only want to pickle the necessary information to recreate the > QuerySet from the database at a later time, pickle

Re: Serialize QuerySet Q (not the result)

2015-04-22 Thread Jani Tiainen
Hi, Straight from the docs: https://docs.djangoproject.com/en/1.8/ref/models/querysets/#pickling-querysets "If you only want to pickle the necessary information to recreate the QuerySet from the database at a later time, pickle the query attribute of the QuerySet." And in same place there ev

Re: Serialize QuerySet Q (not the result)

2015-04-22 Thread guettli
Up to now only Q objects. If you know how to serialize aggregation / annotations, this would be great :-) Am Dienstag, 21. April 2015 14:35:52 UTC+2 schrieb Vijay Khemlani: > > Do you only need to serialize Q objects? No aggregation / annotations? > > On Tue, Apr 21, 2015 at 8:00 AM, guettli > >

Re: Serialize QuerySet Q (not the result)

2015-04-21 Thread Vijay Khemlani
Do you only need to serialize Q objects? No aggregation / annotations? On Tue, Apr 21, 2015 at 8:00 AM, guettli wrote: > > > Am Montag, 20. April 2015 17:12:21 UTC+2 schrieb Vijay Khemlani: >> >> Are the queries associated with a certain form? Or they are arbitrary >> queries? >> >> > Good quest

Re: Serialize QuerySet Q (not the result)

2015-04-21 Thread guettli
Am Montag, 20. April 2015 17:12:21 UTC+2 schrieb Vijay Khemlani: > > Are the queries associated with a certain form? Or they are arbitrary > queries? > > Good question. I would prefer a solution which is not associated with a form. It is only associated with a model. Otherwise it would be easy

Re: Serialize QuerySet Q (not the result)

2015-04-20 Thread Vijay Khemlani
Are the queries associated with a certain form? Or they are arbitrary queries? On Mon, Apr 20, 2015 at 10:01 AM, guettli wrote: > We want to store the QuerySet query (not the result) some how. > > Background: users should be able to save a complex query as "my favorite > query". > > Pickling que