structure du projet + docker, back: mise en place BD et apps, front: début de dev pour le header et mise en place du thème et css global (override des variables bootstrap)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from api.core.models.trackable_model import TrackableModel
|
||||
|
||||
|
||||
class M2M_TemplateStep(TrackableModel):
|
||||
"""
|
||||
Many to Many table for templates and steps (identified by the step type).
|
||||
A template can have the same step type multiple times, but there can't be two entries with the same order for one template.
|
||||
"""
|
||||
|
||||
template = models.ForeignKey("Template", on_delete=models.CASCADE)
|
||||
step_type = models.ForeignKey("StepType", on_delete=models.CASCADE)
|
||||
order = models.IntegerField(verbose_name=_("ordre"))
|
||||
default_notes = models.TextField(
|
||||
verbose_name=_("notes par défaut"), blank=True, default=""
|
||||
)
|
||||
|
||||
class Meta:
|
||||
constraints = [
|
||||
models.UniqueConstraint(
|
||||
fields=["template", "order"],
|
||||
name="unique_template_order",
|
||||
)
|
||||
]
|
||||
Reference in New Issue
Block a user