Display in admin and export 'ext_id' field
This commit is contained in:
parent
baa3af6f86
commit
b25fda850c
2 changed files with 3 additions and 1 deletions
|
|
@ -20,7 +20,8 @@ class StudentAdmin(admin.ModelAdmin):
|
|||
list_filter = ('klass', 'archived')
|
||||
search_fields = ('last_name', 'first_name', 'pcode', 'city', 'klass__name')
|
||||
fields = (('last_name', 'first_name'), 'street', ('pcode', 'city'), 'email',
|
||||
('tel', 'mobile'), 'birth_date', 'klass', 'archived')
|
||||
('tel', 'mobile'), ('birth_date', 'ext_id'), 'klass', 'archived')
|
||||
readonly_fields = ('ext_id',)
|
||||
actions = ['archive']
|
||||
|
||||
def archive(self, request, queryset):
|
||||
|
|
|
|||
|
|
@ -205,6 +205,7 @@ def del_training(request):
|
|||
|
||||
EXPORT_FIELDS = [
|
||||
('Prénom', 'student__first_name'), ('Nom', 'student__last_name'),
|
||||
('ID externe', 'student__ext_id'),
|
||||
('Classe', 'student__klass__name'), ('Filière', 'student__klass__section__name'),
|
||||
('Nom du stage', 'availability__period__title'),
|
||||
('Début', 'availability__period__start_date'), ('Fin', 'availability__period__end_date'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue