Display in admin and export 'ext_id' field

This commit is contained in:
Claude Paroz 2015-05-22 11:48:51 +02:00
parent baa3af6f86
commit b25fda850c
2 changed files with 3 additions and 1 deletions

View file

@ -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):

View file

@ -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'),