22 lines
549 B
Python
22 lines
549 B
Python
from django.db import models
|
|
|
|
|
|
class Garnison(models.Model):
|
|
"""
|
|
Modèle des garnisons
|
|
"""
|
|
|
|
class Cols():
|
|
""" Constantes pour les noms de colonnes """
|
|
|
|
PK = 'gar_id'
|
|
LIEU = 'gar_lieu'
|
|
CODE_POSTAL = 'gar_code_postal'
|
|
|
|
gar_id = models.CharField(max_length=100, primary_key=True)
|
|
gar_lieu = models.CharField(max_length=100, verbose_name="Garnison")
|
|
gar_code_postal = models.CharField(max_length=100, null=True, blank=True)
|
|
|
|
def __str__(self):
|
|
return self.gar_lieu
|