I'm trying to figure out django_ajax_selects and struggling; either the documentation is wrong/unclear or I'm an idiot. Or both.
I'm just trying to get the basics working, and then I'll get it up to speed. I have the field displaying but there's no output when I type in any characters.
In the docs, I'm particularly confused about the admin.py and urls.py fields. I want the field to display on a user-facing template/form, not in the admin, so I would assume that part doesn't apply to me. However, if I'm supposed to modify what's there to fit what I have, I don't know with what.
Here's what I have so far:
settings.py
AJAX_LOOKUP_CHANNELS = {
'owner' : {'model': 'auth.user', 'search_field: 'username'},
}
urls.py
url(r'^admin/lookups/', include(ajax_select_urls)),
#pretty much directly from the docs, but I doubt it's correct for what I'm doing.
forms.py (tried both ways to make field--not sure why one would be used over the other)
class ApplicationForm(forms.ModelForm):
# owner = make_ajax_field(Application, 'owner', 'owner')
owner = AutoCompleteSelectField('owner', required=False, help_text=None)
class Meta:
model = Application
fields = ['name', 'owner']
It seems pretty straightforward, except the urls.py and admin.py, so I assume that's where I went wrong?