# -*- encoding: utf-8 -*-
from django.contrib import admin
from django.db import models

from pagedown.widgets import AdminPagedownWidget

from .models import Promotion, Student, StudentApplication

class StudentAdmin(admin.ModelAdmin):
    list_display = ('user', 'number', 'promotion', 'graduate')
    search_fields = ('number', 'user__first_name', 'user__last_name')

    formfield_overrides = {
        models.TextField: {'widget': AdminPagedownWidget },
    }

class StudentApplicationAdmin(admin.ModelAdmin):

    def _get_name(self,obj):
        return obj.artist.user.get_full_name()

    _get_name.short_description = "Nom"

    list_display = ('_get_name','current_year_application_count','created_on','first_time')



admin.site.register(Promotion)
admin.site.register(StudentApplication,StudentApplicationAdmin)
admin.site.register(Student, StudentAdmin)

@@ -251,20 +251,22 @@
 lay = ('
-user
+artist
 ', 'numb
@@ -628,17 +628,16 @@
 = %22Nom%22%0A
-%0A
     list
@@ -653,78 +653,57 @@
 = ('
-_get_name','current_year_application_count','created_on','first_time')
+artist', 'selected_for_interview', 'updated_on')%0A
 %0A%0A%0A%0A

fix conflict school