class Meta: model = Animal fields = ( "nom", "type_animal", "emplacement", "origine", "motif_abandon", "numero", "sexe", "description", "sante", "date_naissance", "date_arrivee", "sterilise", "date_sterilisation", "vaccine", "date_dernier_vaccin", "poids", "proprietaire", ) widgets = { 'proprietaire': autocomplete.ModelSelect2(url='proprietaire_autocomplete') } date_naissance = DateField(widget=DateInput(format="%d/%m/%Y"), input_formats=("%d/%m/%Y", )) date_arrivee = DateField(widget=DateInput(format="%d/%m/%Y"), input_formats=("%d/%m/%Y", )) date_dernier_vaccin = DateField(widget=DateInput(format="%d/%m/%Y"), input_formats=("%d/%m/%Y", ))
class Meta: model = Animal fields = ( "nom", "nom_adoption", "type_animal", "emplacement", "description", "motif_abandon", "numero", "sexe", "sante", "date_naissance", "date_arrivee", "sterilise", "date_sterilisation", "vaccine", "date_dernier_vaccin", "poids", "inactif", ) date_naissance = DateField(widget=DateInput(format="%d/%m/%Y"), input_formats=("%d/%m/%Y", )) date_arrivee = DateField(widget=DateInput(format="%d/%m/%Y"), input_formats=("%d/%m/%Y", )) date_dernier_vaccin = DateField(widget=DateInput(format="%d/%m/%Y"), input_formats=("%d/%m/%Y", ))
class SejourGainForm(Form): date_debut_gain = DateField( label="Rechercher le montant des pensions entre le ", required=False, widget=DateInput()) date_fin_gain = DateField(label="et le ", required=False, widget=DateInput())
class SejourSearchForm(Form): date_debut_min = DateField(label="Date de début du séjour entre le", required=False, widget=DateInput()) date_debut_max = DateField(label=" et le ", required=False, widget=DateInput()) date_fin_min = DateField(label="Date de fin du séjour entre le", required=False, widget=DateInput()) date_fin_max = DateField(label=" et le ", required=False, widget=DateInput()) proprietaire = ModelChoiceField( queryset=Proprietaire.objects.all().filter(inactif=False), required=False) cohabitation = ChoiceField( choices=BLANK_CHOICE_DASH + [(tag.name, tag.value) for tag in OuiNonChoice], widget=Select(), required=False, )
class VisiteSearchForm(Form): date_min = DateField(label="Date de la visite médicale entre le", required=False, widget=DateInput()) date_max = DateField(label=" et le ", required=False, widget=DateInput())
class AnimalSearchForm(Form): nom = CharField(max_length=100, required=False) nom_adoption = CharField(max_length=100, required=False) emplacement = ChoiceField( choices=BLANK_CHOICE_DASH + [(tag.name, tag.value) for tag in EmplacementChoice], widget=Select(), required=False, ) type_animal = ChoiceField( choices=BLANK_CHOICE_DASH + [(tag.name, tag.value) for tag in TypeAnimalChoice], widget=Select(), required=False, ) proprietaire = ModelChoiceField( queryset=Proprietaire.objects.all().filter(inactif=False), required=False) date_naissance_min = DateField(label="Date de naissance entre le", required=False, widget=DateInput()) date_naissance_max = DateField(label=" et le ", required=False, widget=DateInput()) date_arrivee_min = DateField(label="Date de première arrivée entre le", required=False, widget=DateInput()) date_arrivee_max = DateField(label=" et le ", required=False, widget=DateInput()) date_prochaine_visite_min = DateField( label="Date de prochaine visite vétérinaire entre le", required=False, widget=DateInput(), ) date_prochaine_visite_max = DateField(label=" et le ", required=False, widget=DateInput()) date_adoption_min = DateField(label="Date d'adoption entre le", required=False, widget=DateInput()) date_adoption_max = DateField(label=" et le ", required=False, widget=DateInput()) date_caution_materiel_min = DateField( label="Date d'expiration de la caution materiel entre le", required=False, widget=DateInput()) date_caution_materiel_max = DateField(label=" et le ", required=False, widget=DateInput()) date_caution_sterilisation_min = DateField( label="Date d'expiration de la caution stérilisation entre le", required=False, widget=DateInput()) date_caution_sterilisation_max = DateField(label=" et le ", required=False, widget=DateInput())
class SejourStatsForm(Form): date_debut = DateField(label="Affichage des séjours à partir du", required=False, widget=DateInput())