On Thu, Mar 5, 2009 at 6:56 AM, Christoph Pingel <[email protected]> wrote: > > Hello, > > this is my first post to the list. Great to work with such a well- > designed framework! > > My question - is there an 'official' way to build dynamic search > forms where users can add/remove search criteria? > And if not: How would I best deal with search param names that are > not initially known server side? I could come up with some > handcrafted solution, but I'm looking for best practices here to > avoid unnecessary trouble. >
Well you could have some kind of mapping between GET args and model attributes. I have one view like that where I process GET key values and stick them directly into a .filter() after a bit of processing, i.e. Model.objects.filter(**kwargs). Not sure if that answers your question, but hope it helps. I think what you are after is GET string processing, not sure of a way around the grunt work. -- Milan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

