Query builder or report builder

495 views
Skip to first unread message

mike

unread,
Jul 29, 2009, 1:38:20 PM7/29/09
to Django users
I'm new to django, somewhere between a newbie and novice :-).

I'm looking for a query builder front end...middleware or app, and
thought I'd ask if anyone knows of such a django app or middleware.
I'm trying to avoid re-inventing the wheel, but I'm willing write one
if one doesn't exist.

I've found several standalone apps like SQLeonardo and Navicat, which
look nice, but I'd really like something more integrated within a
django environment. Bottom line is that eventual end users need an
efficient way to perform queries much like MS Access allows.

I've started on a query builder app, but it is becoming a substantial
project by itself (over and above the current project's scope). If a
query builder app is of any interest to others, I would welcome any
input, guidance and/or help. So far, I've taken the approach as to
enumerate tables/fields from existing models within the current django
project, rather than enumerating tables/fields directly from the
database. So far so good, but building a user-friendly interface seems
to be the most challenging part, and I'm hoping jquery will fill this
void.

I'm very interested to hear what anyone else thinks of this concept.

Regards,

Mike Kimmick

Alex Gaynor

unread,
Jul 29, 2009, 1:41:37 PM7/29/09
to django...@googlegroups.com
I've written an app called django-filter which seems like it may be
what you want: http://github.com/alex/django-filter/tree/master .
Here's an example of it in use with a ticketing appliation:
http://imgur.com/BPpmf.png

Alex

--
"I disapprove of what you say, but I will defend to the death your
right to say it." -- Voltaire
"The people's good is the highest law." -- Cicero
"Code can always be simpler than you think, but never as simple as you
want" -- Me

mike

unread,
Jul 29, 2009, 8:36:44 PM7/29/09
to Django users
> I've written an app called django-filter which seems like it may be
> what you want:http://github.com/alex/django-filter/tree/master.
> Here's an example of it in use with a ticketing appliation:http://imgur.com/BPpmf.png
>
> Alex


Alex,

Thanks for the input!

django-filter looks close. However, it appears as django-filter is
based on pre-defined filters for pre-defined querysets, whereas I need
an interface that lets the user define the querysets and
filtersets...on the fly. Is this correct?

I really need a full-blown query builder that essentially allows an
end user to query any or all tables (defined in models + auth_user)
with the capability of joins, where clauses, ordering, etc. Maybe my
idea is a 'pipe dream', but none the less, it's a goal of mine to find/
build a decent web-based query builder tool.

Tools like mysql-admin connect to a db and read the schema which then
allows you to query the db. I'd like to do the same but as a django
app, it would read the 'schema', so to speak, from the django
project's models.py. This part, I have mostly working. Providing a
useful, organized and efficient web interface seems to be the real
challenge.

Regards,

Mike




Alex Gaynor

unread,
Jul 29, 2009, 8:55:54 PM7/29/09
to django...@googlegroups.com
django-filter can work using predefined filters, however it's also
possible to build them up a little more dynamically (but probably not
to the extent you want). For example piano-man (the app I linked)
builds up filters dynamically based on the available options:
http://github.com/alex/piano-man/blob/db6f723dfc15155d7b2f900519d6ca3292a95f76/piano_man/tickets/filters.py

Sergey Smagin

unread,
Jul 30, 2009, 1:45:44 AM7/30/09
to Django users
Dear Mike,

If you not afraid of a Java applet or an ActiveX control at your web
page, you may have a look at Active Query Builder at http://www.activequerybuilder.com/
It has nice MS Access-like GUI and you may fill the list of database
objects among with user-friendly aliases into it; you may load all
necessary metadata from the XML file if needed.
ASP.NET interface will be ready soon.

Regards,

Sergey Smagin
Reply all
Reply to author
Forward
0 new messages