Flatpage-like SQL queries for Django.
If you already have a working Django 1.3+ project and you just want to install the app:
pip install django-flatqueries
Add ‘flatqueries’ to your INSTALLED_APPS in settings.py.
Add this to your urls.py:
Create the database table required by this app:
python manage.py syncdb
This project runs out-of-the box on Django 1.3. Here’s how:
If you put this on another domain, you need to make sure your “site” values are correct. Otherwise, the “view on site” button will not work correctly!
For editing, the standard Django Admin permissions apply. Any superuser will be able to edit, as well as any staff person with the appropriate permissions.
For running queries, an additional permission is needed for staff users. Assign ‘flatqueries.can_run_query’ to grant this permission to users or groups.
Still, be careful not to let query URLs fall into the hands of users you don’t want running them. If you ignore this warning, then any trouble that results is YOUR OWN FAULT. :P