Add fieldsets for Persons model
This commit is contained in:
parent
090f8250ed
commit
1c417301bf
1 changed files with 38 additions and 0 deletions
38
app/admin.py
38
app/admin.py
|
@ -4,6 +4,44 @@ from .models import *
|
||||||
|
|
||||||
class PersonAdmin(admin.ModelAdmin):
|
class PersonAdmin(admin.ModelAdmin):
|
||||||
search_fields = ['title', 'first_name', 'last_name', 'organisation', 'position', 'country__short_name', 'contact_email']
|
search_fields = ['title', 'first_name', 'last_name', 'organisation', 'position', 'country__short_name', 'contact_email']
|
||||||
|
fieldsets = (
|
||||||
|
(None, {
|
||||||
|
'fields': (
|
||||||
|
('mr_mrs', 'title','full_name', 'position'),
|
||||||
|
('first_name', 'last_name', 'search_name', 'status'),
|
||||||
|
('contact_email', 'email_2', 'skype', 'professional_phone'),
|
||||||
|
'organization',
|
||||||
|
'personal_url',
|
||||||
|
'biography',
|
||||||
|
'field_of_expertise',
|
||||||
|
'geographic_area_of_expertise')
|
||||||
|
}),
|
||||||
|
('Research Scale', {
|
||||||
|
'classes': ('collapse',),
|
||||||
|
'fields': ('field_site', 'transect', 'mountain_top', 'mountain_range', 'landscape', 'regional', 'national',
|
||||||
|
'_global'),
|
||||||
|
}),
|
||||||
|
('Methods and tools', {
|
||||||
|
'classes': ('collapse',),
|
||||||
|
'fields': ('biological_field_sampling', 'geographic_area_of_expertise', 'data_mining', 'remote_sensing',
|
||||||
|
'gis', 'spatial_analysis', 'statistical_analysis', 'modelling', 'assessment', 'meta_analysis',
|
||||||
|
'synthesis', 'qualitative_ssm', 'genetic_analyses'),
|
||||||
|
}),
|
||||||
|
('Taxonomic groups', {
|
||||||
|
'classes': ('collapse',),
|
||||||
|
'fields': ('birds', 'mammals', 'reptiles', 'amphibians', 'fish', 'insects', 'molluscs', 'crustaceans',
|
||||||
|
'arachnids', 'angiosperms', 'gymnpsperms', 'fungi', 'algae', 'microbes'),
|
||||||
|
}),
|
||||||
|
('Others', {
|
||||||
|
'classes': ('collapse',),
|
||||||
|
'fields': ('orcid', 'web_of_science', 'twitter', 'instagram', 'updated',
|
||||||
|
('news_letter', 'profile_on_web'),
|
||||||
|
'entry_date',
|
||||||
|
'country',
|
||||||
|
'gmba_function'
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ResourceAdmin(admin.ModelAdmin):
|
class ResourceAdmin(admin.ModelAdmin):
|
||||||
|
|
Loading…
Reference in a new issue