You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
In my application a user can generate reports on multiple models using multiple criteria. I want to let the user save the queries(with the criteria). What is a good approach?
Derek
unread,
Jun 1, 2014, 10:08:42 AM6/1/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
You have not given enough details on your reporting setup; so my guess would be to save the details into a new table. This would include data such as:
* id (for the record) * user_id * report_id * date_time * parameters
The "parameters" are a text field; with the criteria/parameters which created the report saved as a JSON object. That way if the report gets extended you can still retrieve at least some of the criteria from the JSON data.
You might also want to allow the allow the user to give their own Title/Name to the report so they can more easily find it again (assuming you give them a list to choose from); and perhaps the option to make it private/public, depending on your setup.
But one thing you do not want to do is save the actual data from the report!!