Jannis Leidel implemented autocomplete in admin, and I've done it a
few times in user forms.  Jquery has a nice autocomplete plugin
(http://bassistance.de), plus I think there's one in the next Jquery
UI beta/trunk.  IIRC, there's a current GSoC project to add
autocomplete to admin.

In short, there's lots of prior art from which to learn.  But the
summary is that you will need to write a view that pulls possible
matches from the db, and returns them in whatever format is required
by whichever JavaScript component you adopt (or write).  Then add a
URL for your js to call via Ajax, add the js to your template, and
you're in business.

---Peter

On 6/18/09, Bruno Tikami <brunotik...@gmail.com> wrote:
> Hello Mathias,
>
> On Thu, Jun 18, 2009 at 12:37 PM, Mathias Waack
> <mathias.wa...@rantzau.de>wrote:
>
>>
>> Hello django experts,
>>
>> let me first note I'm a beginner in both django and web-development at
>> all.
>
>
> welcome!
>
>
>>
>> I have a form with some select boxes containing several million options.
>> Now
>> I'd like to have something like the search field in wikipedia, where I get
>> suggestions during typing.
>
>
> there are two common features that should help you get it done: suggestion
> and autocomplete. A suggestion feature will show you some common searched
> keywords (like youtube) while the autocomplete stuff will show you some
> database records containing the typed text.
>
>
>> I'm fairly sure this question has been answered several times, but I
>> haven't
>> found any feasible solution. Are there any special keyword you're using
>> for
>> this kind of input fields?
>
>
> These features are implemented in JavaScript, as they are related to the
> data representation _logic_  so it has nothing to do with special keywords
> on inputs.
>
>
>
>>
>> Would be nice to have a solution working with last stable django, but just
>> in
>> case I could also upgrade to 1.1alpha.
>>
>
> I don't have any link to send you right now but once you know a little bit
> more of it, I think you can google it ;-)
>
>
>>
>> Thanks!
>>
>> Mathias
>>
>>
> Tkm
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to