Ajout page de focus sur 1 évaluation avec shearch des évaluation miroir
This commit is contained in:
@@ -1,10 +1,21 @@
|
||||
from django.contrib import admin
|
||||
from studenteval.models import cl_Student_eval
|
||||
from django.urls import reverse
|
||||
from django.utils.html import format_html
|
||||
from . import views
|
||||
|
||||
|
||||
|
||||
class _cl_Student_eval_admin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('sStudent', "get_ref_of_eval", "nEval_Type", "nEval_Mode", "sAuthor")
|
||||
list_display = ('ID','sStudent', "get_ref_of_eval", "nEval_Type", "nEval_Mode", "sAuthor", 'get_mirrored', 'action_buttons')
|
||||
|
||||
|
||||
def action_buttons(self, obj):
|
||||
action1_url = '/student_eval/show_pdf/{}/'.format(obj.uuid)
|
||||
return format_html('<a href="{}">Voir PDF</a>', action1_url)
|
||||
|
||||
action_buttons.short_description = 'Voir la fiche PDF'
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +50,9 @@ class _cl_Student_eval_admin(admin.ModelAdmin):
|
||||
obj.sStudent = obj.Student.first_name + " " + obj.Student.last_name
|
||||
print(f"sStudent = {obj.sStudent}")
|
||||
|
||||
print(obj.Author_2e)
|
||||
if obj.Author_2e is not None:
|
||||
print(f"Maj author 2e")
|
||||
obj.sAuthor_2e = obj.Author_2e.first_name + " " + obj.Author_2e.last_name
|
||||
|
||||
obj.save()
|
||||
|
Reference in New Issue
Block a user