fix: Correction dépendances circulaires

This commit is contained in:
N3WT DE COMPET
2025-05-12 15:16:46 +02:00
parent 52bba46cbb
commit fc9a1ed252
11 changed files with 70 additions and 60 deletions

View File

3
Back-End/Common/admin.py Normal file
View File

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
Back-End/Common/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class CommonConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'Common'

13
Back-End/Common/models.py Normal file
View File

@ -0,0 +1,13 @@
from django.db import models
class StudentCompetency(models.Model):
student = models.ForeignKey('Subscriptions.Student', on_delete=models.CASCADE, related_name='competency_scores')
competency = models.ForeignKey('School.Competency', on_delete=models.CASCADE, related_name='student_scores')
score = models.DecimalField(max_digits=5, decimal_places=2, null=True, blank=True)
comment = models.TextField(blank=True, null=True)
class Meta:
unique_together = ('student', 'competency')
def __str__(self):
return f"{self.student} - {self.competency.name} - Score: {self.score}"

3
Back-End/Common/tests.py Normal file
View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

3
Back-End/Common/views.py Normal file
View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.