Hi John,
I built an app that basically lets you create an advanced search against a 
model (or related models).
I am using it in production on two different applications. If you use it I 
would be happy to have feedback.

You can find it here: 
https://github.com/ckirby/django-modelqueryform

Kirby

On Thursday, November 13, 2014 1:34:33 PM UTC-6, John Schmitt wrote:
>
> I have a big django project with multiple apps, models, and the models 
> have quite a few fields. 
>
> A request came that asked for a page that allows the user to pick and 
> choose from the various fields to create their own query. 
>
> Does any precedent for this exist? 
>
> If I may use a car analogy, a django project that stores info on cars 
> complete with many types of engines, car models, interiors, entertainment 
> systems, and trim features.  Could I create an app where a user could 
> arbitrarily pick and choose fields from each of those models to perform a 
> query on their web browser?  One customer could search for cars with V8 
> engines and DVD players and a different customer could search for cars with 
> nylon interiors, no entertainment systems and manufactured between dateA 
> and dateB.  The key thing is that the customer gets to browse for the 
> available attricutes and add them to their query. 
>
> The most obvious would be create an app that fixed every possible field 
> and appropriate form for each field.  When a model changes and a new field 
> is added, simply add another field to this query app.   This is what real 
> estate sites seem to do.  I'd like to think there's a more general and 
> elegant way to do this.  Is there a general purpose field chooser? 
>
> At first I thought that this project would be a good starting point, 
> because he kind of implements spreadsheet: 
>
> https://github.com/tmu/dimtable 
>
> I'm not sure how I can map my problem to that potential solution. 
>
> Discussion and wild-eyed ideas welcome. 
>
> John 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ee626ec1-f217-4b92-bc8c-a9c860ffb9ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to