mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
feat: Utilisation de l'établissement en variable de session / gestion de
la page des inscriptions en fonction de l'établissement / mise à jour du mock_data à l'init
This commit is contained in:
@ -3,8 +3,7 @@ from django.utils.timezone import now
|
||||
from django.conf import settings
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from Auth.models import Profile
|
||||
from School.models import SchoolClass, Fee, Discount, Establishment
|
||||
from School.models import SchoolClass, Fee, Discount
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
@ -29,7 +28,7 @@ class Guardian(models.Model):
|
||||
email = models.CharField(max_length=200, default="", blank=True)
|
||||
phone = models.CharField(max_length=200, default="", blank=True)
|
||||
profession = models.CharField(max_length=200, default="", blank=True)
|
||||
associated_profile = models.ForeignKey(Profile, on_delete=models.CASCADE)
|
||||
associated_profile = models.ForeignKey('Auth.Profile', on_delete=models.CASCADE)
|
||||
|
||||
def __str__(self):
|
||||
return self.last_name + "_" + self.first_name
|
||||
@ -80,7 +79,7 @@ class Student(models.Model):
|
||||
payment_method = models.IntegerField(choices=PaymentMethod, default=PaymentMethod.NONE, blank=True)
|
||||
|
||||
# Many-to-Many Relationship
|
||||
profiles = models.ManyToManyField(Profile, blank=True)
|
||||
profiles = models.ManyToManyField('Auth.Profile', blank=True)
|
||||
|
||||
# Many-to-Many Relationship
|
||||
guardians = models.ManyToManyField(Guardian, blank=True)
|
||||
@ -215,7 +214,7 @@ class RegistrationForm(models.Model):
|
||||
null=True,
|
||||
blank=True)
|
||||
|
||||
establishment = models.ForeignKey(Establishment, on_delete=models.CASCADE, related_name='register_forms')
|
||||
establishment = models.ForeignKey('School.Establishment', on_delete=models.CASCADE, related_name='register_forms')
|
||||
|
||||
def __str__(self):
|
||||
return "RF_" + self.student.last_name + "_" + self.student.first_name
|
||||
|
||||
Reference in New Issue
Block a user