feat: push test [#N3WTS-17]

This commit is contained in:
N3WT DE COMPET
2025-11-29 11:33:21 +01:00
parent 5e62ee5100
commit 0fb668b212
8 changed files with 4 additions and 221 deletions

View File

@ -294,12 +294,13 @@ class RegistrationForm(models.Model):
####################### MASTER FILES ########################
#############################################################
####### DocuSeal masters (documents école, à signer ou pas) #######
####### Formulaires masters (documents école, à signer ou pas) #######
class RegistrationSchoolFileMaster(models.Model):
groups = models.ManyToManyField(RegistrationFileGroup, related_name='school_file_masters', blank=True)
id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=255, default="")
is_required = models.BooleanField(default=False)
formMasterData = models.JSONField(default=list, blank=True, null=True)
def __str__(self):
return f'{self.group.name} - {self.id}'
@ -321,7 +322,7 @@ def registration_school_file_upload_to(instance, filename):
def registration_parent_file_upload_to(instance, filename):
return f"registration_files/dossier_rf_{instance.registration_form.pk}/parent/{filename}"
####### DocuSeal templates (par dossier d'inscription) #######
####### Formulaires templates (par dossier d'inscription) #######
class RegistrationSchoolFileTemplate(models.Model):
master = models.ForeignKey(RegistrationSchoolFileMaster, on_delete=models.CASCADE, related_name='school_file_templates', blank=True)
id = models.IntegerField(primary_key=True)
@ -329,6 +330,7 @@ class RegistrationSchoolFileTemplate(models.Model):
name = models.CharField(max_length=255, default="")
registration_form = models.ForeignKey(RegistrationForm, on_delete=models.CASCADE, related_name='school_file_templates', blank=True)
file = models.FileField(null=True,blank=True, upload_to=registration_school_file_upload_to)
formTemplateData = models.JSONField(default=list, blank=True, null=True)
def __str__(self):
return self.name