features in relationship admin ajax_selects
This commit is contained in:
parent
c09706d8b6
commit
459e38e758
|
@ -59,8 +59,14 @@ class featuresForm(forms.ModelForm):
|
||||||
# exclude = ('info',)
|
# exclude = ('info',)
|
||||||
|
|
||||||
class Meta:
|
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):
|
class AuthorityRecordAdmin(admin.ModelAdmin):
|
||||||
form = authRecordForm
|
form = authRecordForm
|
||||||
|
|
|
@ -89,6 +89,7 @@ AJAX_LOOKUP_CHANNELS = {
|
||||||
'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'),
|
'time_frame': dict(model='places.timeframe', search_field='description'),
|
||||||
'feature_type': ('places.lookups', 'FeatureTypeLookup'),
|
'feature_type': ('places.lookups', 'FeatureTypeLookup'),
|
||||||
|
'feature': dict(model='places.feature', search_field='preferred_name'),
|
||||||
# this generates a simple channel
|
# this generates a simple channel
|
||||||
# specifying the model Track in the music app, and searching against the 'title' field
|
# specifying the model Track in the music app, and searching against the 'title' field
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user