mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
fix: Correction dépendances circulaires
This commit is contained in:
0
Back-End/Common/__init__.py
Normal file
0
Back-End/Common/__init__.py
Normal file
3
Back-End/Common/admin.py
Normal file
3
Back-End/Common/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
Back-End/Common/apps.py
Normal file
6
Back-End/Common/apps.py
Normal 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
13
Back-End/Common/models.py
Normal 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
3
Back-End/Common/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
3
Back-End/Common/views.py
Normal file
3
Back-End/Common/views.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
Reference in New Issue
Block a user