from django.db import models CITY_CHOICES= [ ('Berstett', 'Berstett'), ('Bilwisheim', 'Bilwisheim'), ('Donnenheim', 'Donnenheim'), ('Eckwersheim', 'Eckwersheim'), ('Lampertheim', 'Lampertheim'), ('Mittelhausen', 'Mittelhausen'), ('Mittelshaeffolsheim', 'Mittelshaeffolsheim'), ('Olwisheim', 'Olwisheim'), ('Rumersheim', 'Rumersheim'), ('Vendenheim', 'Vendenheim'), ] # Create your models here. class GivenItems(models.Model): computer_ok = models.BooleanField(verbose_name= 'PC/MAC non fonctionnel, toutes les données seront effacées') computer_nok = models.BooleanField(verbose_name= 'PC/MAC fonctionnel, toutes les données seront effacées') printer_ok = models.BooleanField(verbose_name= 'Imprimante fonctionnelle') screen_ok = models.BooleanField(verbose_name='Ecran fonctionnel') other = models.BooleanField(verbose_name='Autre ... (à préciser dans les commentaires)') name = models.CharField(max_length=40, verbose_name='Nom/Prénom', null=True, blank=True) email = models.EmailField(max_length=60, verbose_name='Courriel') phone = models.CharField(max_length=128, verbose_name='Téléphone', null=True, blank=True) city = models.CharField(max_length=20, verbose_name='Localité', choices=CITY_CHOICES) comments = models.TextField(max_length=512, verbose_name='Commentaires/Précisions') class NeededItems(models.Model): computer_ok = models.BooleanField(verbose_name='Ordinateur complet ou PC portable') printer_ok = models.BooleanField('Une imprimante') screen_ok = models.BooleanField('Un Ecran') something_is_broken = models.BooleanField('Quelque chose ne fonctionne plus') other = models.BooleanField(verbose_name='Autre ... (à préciser dans les commentaires)') name = models.CharField(max_length=40, verbose_name='Nom/Prénom', null=True, blank=True) email = models.EmailField(max_length=60, verbose_name='Courriel') phone = models.CharField(max_length=128, verbose_name='Téléphone', null=True, blank=True) city = models.CharField(max_length=20, verbose_name='Localité', choices=CITY_CHOICES) comments = models.TextField(max_length=512, verbose_name='Commentaires/Précisions')