Dear all,
I'm trying to put YUI autocomplete in my form, following this
tutorial: http://www.djangosnippets.org/snippets/392/

There are two main problems:

1) Inside the my form class, if I specify:

def __init__(self,*args, **kwargs ):
super(QuizForm, self).__init__(*args,
**kwargs)
n_lookup_url = reverse('djangoOp.op.views.json_lookup')  # url to your
view
n_schema = '["resultset.results",
"tag", ]'
forms.fields['tags'].widget = AutoCompleteWidget()
forms.fields['tags'].widget.lookup_url = n_lookup_url
forms.fields['tags'].widget.schema = n_schema

I receive:

unsubscriptable object
on line:
forms.fields['tags'].widget = AutoCompleteWidget()

2) I overcome the last problem through AutoCompleteWidget __init__
function.
Unfortunately I receive another, more serious, error:

'AutoCompleteWidget' object has no attribute 'attrs'

Do I make some terrible mistakes or tutorial miss some information ?

I think Autocomplete and other ajax stuff could improve a lot the
whole Django project, but right now I feel the integration too much
complicated! Is it just my impression?

Lorenzo




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to