Skip to main content

Flatpage-like SQL queries for Django.

Project description

Installing the app package from PyPI

If you already have a working Django 1.3+ project and you just want to install the app:

  1. Get the package:

    pip install django-flatqueries

  2. Add ‘flatqueries’ to your INSTALLED_APPS in

  3. Add this to your

    (r’^flatqueries/’, ‘flatqueries.urls’)

  4. Create the database table required by this app:

    python syncdb

Getting the sample project

This project runs out-of-the box on Django 1.3. Here’s how:

  1. Grab the code.

    svn checkout django-flatqueries-demo

  2. cd django-flatqueries-demo/sample_project

  3. Create the database.

    python syncdb - Yes, create a superuser

  4. Load the demo data. *(Optional, but see deployment note)

    python loaddata demo_data.json

  5. Start the local development server.

    python runserver

  6. Login at to play with flatqueries.



  1. On its view page, click the “view on site” button.

  2. Click the “Run” button.


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

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-flatqueries-0.1.tar.gz (6.4 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page