make URI field in Authority Record admin widet
This commit is contained in:
parent
a53719b3a5
commit
3933e87dfb
|
@ -42,19 +42,11 @@ class FeatureTypeFilter(SimpleListFilter):
|
|||
return queryset.filter(feature_type=val)
|
||||
'''
|
||||
|
||||
class AuthorityRecordAdmin(admin.ModelAdmin):
|
||||
search_fields = ['preferred_name']
|
||||
|
||||
|
||||
class FeatureNamesInline(admin.TabularInline):
|
||||
model = Name
|
||||
extra = 0
|
||||
|
||||
class FeatureRelationInline(admin.TabularInline):
|
||||
model = Feature.relationships.through
|
||||
extra = 1
|
||||
fk_name = 'feature1'
|
||||
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',
|
||||
|
@ -70,6 +62,23 @@ class featuresForm(forms.ModelForm):
|
|||
model = Feature
|
||||
|
||||
|
||||
class AuthorityRecordAdmin(admin.ModelAdmin):
|
||||
form = authRecordForm
|
||||
search_fields = ['preferred_name']
|
||||
|
||||
|
||||
class FeatureNamesInline(admin.TabularInline):
|
||||
model = Name
|
||||
extra = 0
|
||||
|
||||
class FeatureRelationInline(admin.TabularInline):
|
||||
model = Feature.relationships.through
|
||||
extra = 1
|
||||
fk_name = 'feature1'
|
||||
|
||||
|
||||
|
||||
|
||||
class FeatureAdmin(admin.OSMGeoAdmin):
|
||||
fields = ('preferred_name', 'feature_type', 'admin1', 'admin2', 'geometry', 'url', 'authority_record', 'time_frame', 'is_primary',)
|
||||
search_fields = ['preferred_name']
|
||||
|
|
Loading…
Reference in New Issue
Block a user