Skip to content

Commit

Permalink
Ajouter des nouveaux types de documents
Browse files Browse the repository at this point in the history
  • Loading branch information
Anto59290 committed Sep 18, 2024
1 parent 7257825 commit f8f61bb
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1 deletion.
39 changes: 39 additions & 0 deletions core/migrations/0017_alter_document_document_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated by Django 5.0.3 on 2024-09-18 07:26

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("core", "0016_alter_message_message_type_finsuivicontact_and_more"),
]

operations = [
migrations.AlterField(
model_name="document",
name="document_type",
field=models.CharField(
choices=[
(
"arrete prefectoral ministériel",
"Arrêté préfectoral/ministériel",
),
("autre", "Autre document"),
("cartographie", "Cartographie"),
("certificat phytosanitaire", "Certificat phytosanitaire"),
("compte rendu reunion", "Compte rendu de réunion"),
("courrier officiel", "Courrier officiel"),
("dsce", "DSCE"),
("facture", "Facture"),
("image", "Image"),
("passeport phytosanitaire", "Passeport phytosanitaire"),
("rapport analyse", "Rapport d'analyse"),
("rapport inspection", "Rapport d'inspection"),
("reglementation", "Réglementation"),
("document de transport", "Document de transport"),
],
max_length=100,
verbose_name="Type de document",
),
),
]
29 changes: 28 additions & 1 deletion core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,36 @@ def clean(self):


class Document(models.Model):
DOCUMENT_ARRETE = "arrete prefectoral ministériel"
DOCUMENT_AUTRE = "autre"
DOCUMENT_CARTOGRAPHIE = "cartographie"
DOCUMENT_TYPE_CHOICES = ((DOCUMENT_CARTOGRAPHIE, "Cartographie"), (DOCUMENT_AUTRE, "Autre document"))
DOCUMENT_CERTIFICAT_PHYTOSANITAIRE = "certificat phytosanitaire"
DOCUMENT_COMPTE_RENDU_REUNION = "compte rendu reunion"
DOCUMENT_COURRIER_OFFICIEL = "courrier officiel"
DOCUMENT_DSCE = "dsce"
DOCUMENT_FACTURE = "facture"
DOCUMENT_IMAGE = "image"
DOCUMENT_PASSEPORT_PHYTOSANITAIRE = "passeport phytosanitaire"
DOCUMENT_RAPPORT_ANALYSE = "rapport analyse"
DOCUMENT_RAPPORT_INSPECTION = "rapport inspection"
DOCUMENT_REGLEMENTATION = "reglementation"
DOCUMENT_TRANSPORT = "document de transport"
DOCUMENT_TYPE_CHOICES = (
(DOCUMENT_ARRETE, "Arrêté préfectoral/ministériel"),
(DOCUMENT_AUTRE, "Autre document"),
(DOCUMENT_CARTOGRAPHIE, "Cartographie"),
(DOCUMENT_CERTIFICAT_PHYTOSANITAIRE, "Certificat phytosanitaire"),
(DOCUMENT_COMPTE_RENDU_REUNION, "Compte rendu de réunion"),
(DOCUMENT_COURRIER_OFFICIEL, "Courrier officiel"),
(DOCUMENT_DSCE, "DSCE"),
(DOCUMENT_FACTURE, "Facture"),
(DOCUMENT_IMAGE, "Image"),
(DOCUMENT_PASSEPORT_PHYTOSANITAIRE, "Passeport phytosanitaire"),
(DOCUMENT_RAPPORT_ANALYSE, "Rapport d'analyse"),
(DOCUMENT_RAPPORT_INSPECTION, "Rapport d'inspection"),
(DOCUMENT_REGLEMENTATION, "Réglementation"),
(DOCUMENT_TRANSPORT, "Document de transport"),
)

nom = models.CharField(max_length=256)
description = models.TextField()
Expand Down

0 comments on commit f8f61bb

Please sign in to comment.