I'm looking at letting my users implement reports via a web interface where they can essentially define the report. I need to store that report definition in the db, so they can re-run it whenever.
The problem I have is serialize all that to and from a QuerySet.
I've hacked something that builds the query from the web definition using Qs.
I pass that into a query set, call _as_sql on it, save/serialize the sql and the params in the db.
Then next time, read that and pass it into raw.
It's pretty hacky and I'd like to avoid using _as_sql if possible.
Is there a better way to implement what I want?
Cheers,
Mike S.