Add new VSL app with initial models and admin configuration.
Created VslDest model with fields for ID, name, creation date, and update date. Added VslConfig to settings.py. Configured admin interface for VslDest. Initialized migrations for VslDest model. Included basic test and view files for future development.
This commit is contained in:
22
vsl/models.py
Normal file
22
vsl/models.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class VslDest(models.Model):
|
||||
# ID auto-incrémenté par défaut
|
||||
id = models.AutoField("ID du Suivi", primary_key=True)
|
||||
|
||||
# Champ de chaîne de caractères avec une longueur maximale de 255 caractères
|
||||
name = models.CharField("Dénomination", max_length=255)
|
||||
|
||||
# Champ pour la date de création, automatiquement défini à la création
|
||||
dtCreate = models.DateTimeField("Date de création", auto_now_add=True)
|
||||
|
||||
# Champ pour la date de modification, automatiquement mis à jour à chaque modification
|
||||
dtUpdate = models.DateTimeField("Date de modification", auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
class Meta:
|
||||
verbose_name = "Destination VSL"
|
||||
verbose_name_plural = "Destinations VSL"
|
||||
ordering = ["id"]
|
||||
Reference in New Issue
Block a user