changement page admin et nom classe
This commit is contained in:
@@ -4,11 +4,12 @@ from studenteval.models import cl_Student_eval
|
|||||||
|
|
||||||
class _cl_Student_eval_admin(admin.ModelAdmin):
|
class _cl_Student_eval_admin(admin.ModelAdmin):
|
||||||
|
|
||||||
list_display = ('uuid', 'sStudent', "get_ref_of_eval", "nEval_Type", "nEval_Mode", "sAuthor")
|
list_display = ('sStudent', "get_ref_of_eval", "nEval_Type", "nEval_Mode", "sAuthor")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
search_fields = ['Student']
|
search_fields = ['sStudent', 'sRef']
|
||||||
|
list_filter = ['sStudent',"sAuthor", "nEval_Type", "nEval_Mode"]
|
||||||
|
|
||||||
|
|
||||||
#fields = ["Vehicle", "nType",'sTitle', "sDesc","dtStart", "dtEnd", "Author"]
|
#fields = ["Vehicle", "nType",'sTitle', "sDesc","dtStart", "dtEnd", "Author"]
|
||||||
|
@@ -4,4 +4,4 @@ from django.apps import AppConfig
|
|||||||
class StudentevalConfig(AppConfig):
|
class StudentevalConfig(AppConfig):
|
||||||
default_auto_field = 'django.db.models.BigAutoField'
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
name = 'studenteval'
|
name = 'studenteval'
|
||||||
verbose_name = "Suivi étudiants - stagiaires"
|
verbose_name = "Suivis étudiants"
|
||||||
|
@@ -60,20 +60,20 @@ class cl_Student_eval(models.Model):
|
|||||||
sStudent = models.CharField("Nom de l'étudiant/stagiaire", max_length=120)
|
sStudent = models.CharField("Nom de l'étudiant/stagiaire", max_length=120)
|
||||||
|
|
||||||
#Information sur le suivi
|
#Information sur le suivi
|
||||||
nEval_Type = models.CharField('Type de suivi', max_length=1, choices=EVAL_TYPE, default=1)
|
nEval_Type = models.CharField('Type de suivi', max_length=1, choices=EVAL_TYPE, default=0)
|
||||||
dtDate = models.DateField("Date concernée", default=timezone.now)
|
dtDate = models.DateField("Date concernée", default=timezone.now)
|
||||||
sRef = models.CharField("N° de référence / FIP", max_length=120, blank=True,)
|
sRef = models.CharField("N° de référence / FIP", max_length=120, blank=True,)
|
||||||
nEval_Mode = models.CharField('Mode de suivi ', max_length=1, choices=EVAL_MODE, default=1)
|
nEval_Mode = models.CharField('Mode de suivi ', max_length=1, choices=EVAL_MODE, default=0)
|
||||||
sDesc_neg = models.TextField("Points à améliorer")
|
sDesc_neg = models.TextField("Points à améliorer")
|
||||||
sDesc_pos = models.TextField("Points positifs")
|
sDesc_pos = models.TextField("Points positifs")
|
||||||
sDesc_global = models.TextField("Avis global sur l'intervention/journée/exercice")
|
sDesc_global = models.TextField("Avis global sur l'intervention/journée/exercice")
|
||||||
|
|
||||||
#Information sur l'intervention
|
#Information sur l'intervention
|
||||||
nInter_Nature = models.CharField('Nature', max_length=1, choices=INTER_NATURE, default=1, blank=True,)
|
nInter_Nature = models.CharField('Nature', max_length=1, choices=INTER_NATURE, default=0, blank=True,)
|
||||||
nInter_Priority = models.CharField('Priorité', max_length=1, choices=INTER_PRIORITY, default=1, blank=True,)
|
nInter_Priority = models.CharField('Priorité', max_length=1, choices=INTER_PRIORITY, default=0, blank=True,)
|
||||||
nInter_Complexity = models.CharField('Nature de complexité', max_length=1, choices=INTER_COMPLEXITY, default=1, blank=True,)
|
nInter_Complexity = models.CharField('Nature de complexité', max_length=1, choices=INTER_COMPLEXITY, default=0, blank=True,)
|
||||||
sInter_Desc = models.TextField("Description courte", blank=True,)
|
sInter_Desc = models.TextField("Description courte", blank=True,)
|
||||||
nStudent_Role = models.CharField("Rôle de l'étudiant/stagiaire", max_length=1, choices=STUDENT_ROLE, default=1, blank=True,)
|
nStudent_Role = models.CharField("Rôle de l'étudiant/stagiaire", max_length=1, choices=STUDENT_ROLE, default=0, blank=True,)
|
||||||
|
|
||||||
|
|
||||||
#Automatic data
|
#Automatic data
|
||||||
@@ -114,8 +114,8 @@ class cl_Student_eval(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{ self.sStudent } => {self.sRef} ({ self.nEval_Mode})"
|
return f"{ self.sStudent } => {self.sRef} ({EVAL_MODE[int(self.nEval_Mode)][1]})"
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = "Suivi étudiants - stagiaires"
|
verbose_name = "Suivi étudiants"
|
||||||
verbose_name_plural = "Suivis étudiants - stagiaires"
|
verbose_name_plural = "Suivis étudiants"
|
||||||
|
Reference in New Issue
Block a user