Released 7 years ago , Last update 7 years ago

Admin tool in order to get custom reports. The objective of django-qbe is provide a assited and interactive way of making complex queries with no technical knowledge (or minimal) to get custom reports from the objects of Django models. Based on QBE proposal from IBM®, django-qbe is intended to remove the limitations of Django QuerySets objects and to use the whole expresive power of the subjacent SQL.

  • View and autodiscover relations among the models in a visual way (ForeignKey fields are green andManyToMany ones are red).
  • Tabular creation of queries with fields to show, criterias, lookups and order (only AND conditions by now).
  • Auto adition of right fields when ForeignKey or ManyToMany fields are selected.
  • No models in the project, so you can add django-qbe whenever you want with no syncdb.
  • Pagination of results.
  • Bookmarklet to save and share the queries.
  • Export results to .csv, .odt and .xls, but it's extensible by the user.
  • Access restricted to users through a customizable function.
  • Links to admin views (if available) in the results objects.

Django implementantion for Query By Example (QBE) on Github


14 day 14-day money-back guarantee


Affero GPL

  • Perpetual license

  • Unlimited projects

  • Can distribute code and binary products

  • Conditional commercial use

  • Attribution required


Developer License

  • Perpetual license

  • Unlimited projects

  • Can distribute code and binary products

  • Commercial use


Using the Python Package Index (PyPI_) and easy_install script:


$ easy_install django-qbe

Or through pip:

$ pip install django-qbe

But you also can download the django_qbe directory using git:

$ git clone git://
$ cp -r qbe/django_qbe /path/to/your/project

Adding to the project settings:

    # [...] django builtins applications
    # [...] Any other application

And adding the urlconf in your project

# qbe
url(r'^qbe/', include('django_qbe.urls')),

You must not forgive link or copy the django_qbe/media/django_qbe directory in your project media directory:

$ ln -s django_qbe/media/django_qbe /path/to/your/project/media/

That's all. Then you can access to http://host:port/qbe However, you can add a link from your admin page changing the admin index template fo your AdminSite:

class AdminSite(admin.AdminSite):
    index_template = "qbe_index.html"

Or adding in your custom admin index template the next javascript:


Just typing like a regular pip dependency installation:  

    $ pip install django-qbe

You can download this project in either [zip][1] or [tar][2] formats.

You can also clone the project with Git by running:

$ git clone git://


The next lines show de available settings and its default values.

Enable autocompletion tool (work in progress, not enabled yet):


Enable an Exhibit faceted navigation for results (not yet implemented):


Admin module name to add admin urls in results:

QBE_ADMIN = "admin"

Function to control to users with access to QBE:

QBE_ACCESS_FOR = lambda user: user.is_staff

Path to QBE formats export file, in order to add custom export formats:

QBE_FORMATS_EXPORT = "qbe_formats"


Free software distributted under the GNU Affero General Public License for Open Source Projects.

Contact to author for commercial usage.


Javier de la Rosa (@versae)
With the funding of Cultureplex, the Cultural Complexity Lab @ UWO.


3 licenses, starting from From » FREE View Licenses

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.

Or enter your name and Email
  • JH Jukka Honkola 6 years ago
    Is the Affero GPL licence here meant to be GPL or LGPL? Meaning, if I use that, am I required to share on request all my django code (the "GPL" case) or am I only required to publish modifications to django-qbe (the "LGPL" case). The pricing page confusingly mentions Affero GPL in text, and LGPL in mouse hover bubble.