add auto-complete for time-frame

This commit is contained in:
Sanj 2011-08-30 19:03:38 +05:30
parent 4ad1869eab
commit c0dd1a7d36
2 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,7 @@ class featuresForm(forms.ModelForm):
required=True,
widget=forms.TextInput(attrs={'size': '40'}))
authority_record = AutoCompleteSelectField('authority_record', required=False)
time_frame = AutoCompleteSelectField('time_frame', required=False)
# exclude = ('info',)

View File

@ -86,7 +86,8 @@ MIDDLEWARE_CLASSES = (
AJAX_LOOKUP_CHANNELS = {
# the simplest case, pass a DICT with the model and field to search against :
'authority_record' : dict(model='places.authorityrecord',search_field='preferred_name'),
'authority_record' : dict(model='places.authorityrecord', search_field='preferred_name'),
'time_frame': dict(model='places.timeframe', search_field='description'),
# this generates a simple channel
# specifying the model Track in the music app, and searching against the 'title' field