features in relationship admin ajax_selects

This commit is contained in:
Sanj 2011-08-31 04:06:08 +05:30
parent c09706d8b6
commit 459e38e758
2 changed files with 8 additions and 1 deletions

View File

@ -59,8 +59,14 @@ class featuresForm(forms.ModelForm):
# exclude = ('info',)
class Meta:
model = Feature
model = Feature
class relationsForm(forms.ModelForm):
feature1 = AutoCompleteSelectField('feature', required=True)
feature2 = AutoCompleteSelectField('feature', required=True)
class Meta:
model = Relationship
class AuthorityRecordAdmin(admin.ModelAdmin):
form = authRecordForm

View File

@ -89,6 +89,7 @@ AJAX_LOOKUP_CHANNELS = {
'authority_record' : dict(model='places.authorityrecord', search_field='preferred_name'),
'time_frame': dict(model='places.timeframe', search_field='description'),
'feature_type': ('places.lookups', 'FeatureTypeLookup'),
'feature': dict(model='places.feature', search_field='preferred_name'),
# this generates a simple channel
# specifying the model Track in the music app, and searching against the 'title' field