Hi!
This is my snippet, that you're using, so I hope I can help :)
> 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()
If you're writting this in form's __init__ method then use:
self.fields['tags'].widget = AutoCompleteWidget()
self.fields['tags'].widget.lookup_url = n_lookup_url
self.fields['tags'].widget.schema = n_schema
--
Maciej Wisniowski
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---