make URI field in Authority Record admin widet
This commit is contained in:
parent
a53719b3a5
commit
3933e87dfb
|
@ -42,7 +42,28 @@ class FeatureTypeFilter(SimpleListFilter):
|
|||
return queryset.filter(feature_type=val)
|
||||
'''
|
||||
|
||||
class authRecordForm(forms.ModelForm):
|
||||
uri = forms.CharField(label="URI", required=True, widget=forms.TextInput(attrs={'size': '40'}))
|
||||
|
||||
class Meta:
|
||||
model = AuthorityRecord
|
||||
|
||||
class featuresForm(forms.ModelForm):
|
||||
url = forms.CharField(label='URI',
|
||||
required=True,
|
||||
widget=forms.TextInput(attrs={'size': '40'}))
|
||||
authority_record = AutoCompleteSelectField('authority_record', required=False)
|
||||
time_frame = AutoCompleteSelectField('time_frame', required=False)
|
||||
feature_type = AutoCompleteSelectField('feature_type', required=False)
|
||||
|
||||
# exclude = ('info',)
|
||||
|
||||
class Meta:
|
||||
model = Feature
|
||||
|
||||
|
||||
class AuthorityRecordAdmin(admin.ModelAdmin):
|
||||
form = authRecordForm
|
||||
search_fields = ['preferred_name']
|
||||
|
||||
|
||||
|
@ -56,18 +77,6 @@ class FeatureRelationInline(admin.TabularInline):
|
|||
fk_name = 'feature1'
|
||||
|
||||
|
||||
class featuresForm(forms.ModelForm):
|
||||
url = forms.CharField(label='URI',
|
||||
required=True,
|
||||
widget=forms.TextInput(attrs={'size': '40'}))
|
||||
authority_record = AutoCompleteSelectField('authority_record', required=False)
|
||||
time_frame = AutoCompleteSelectField('time_frame', required=False)
|
||||
feature_type = AutoCompleteSelectField('feature_type', required=False)
|
||||
|
||||
# exclude = ('info',)
|
||||
|
||||
class Meta:
|
||||
model = Feature
|
||||
|
||||
|
||||
class FeatureAdmin(admin.OSMGeoAdmin):
|
||||
|
|
Loading…
Reference in New Issue
Block a user