Allow admins to control Django ORM through a view
If admins know SQL - give them phpmyadmin with read-only privelegies.
I want to expose ORM control to my users. I don't mean I want them to add stuff to part of the code, I mean I want to actually allow them to write django code. I only need to allow specific models, and only allow fetching of data (not add or change anything). There'll be like a console and each line will be executed (sort of like ipython notebook), and the returned data (if it's a QuerySet object) will then be displayed in a table of some sort.
This feature will only be available to my super-user admins and so won't be a security concern. What's the best way to do this (if at all possible)?
update
Maybe I should give some background for the intended usage here. See I have built an app that collects and saves statistical information. My users have many filters I have built for them, But they constantly ask for more and more flexibility, sometimes they need to filter on something very specific and it's only a one-time thing, so I can't just keep adding more and more features.
Now my superusers know a little python, and I got the idea that maybe I can give them some sort of way to filter on their own. The idea is they will be able to save queries and name them, then adding those custom filters to a list present on the main site.
The way it would work is they get a QuerySet object containing all objects, which they can filter using a list of pre-determined commands. After running the command, the server will evaluate it, look for errors or forbidden code, and only then will run it. But I'm guessing I can't just use eval() in a production server, now can I? So it there some other way?