forms.py 1.45 KB
Newer Older
1 2 3
# -*- coding: utf-8 -*-
from django import forms

4 5
from django.utils.translation import ugettext_lazy as _

6
class BaseForm(forms.Form):
7 8
    """ Formulaire de recherche pour le cableur """
    uid = forms.CharField(label=u'Login', max_length=40, required=False)
9
    chambre = forms.CharField(label=_(u'Chambre'), max_length=5, required=False)
10
    nom = forms.CharField(label=_(u'Nom'), max_length=40, required=False)
11 12

class AdherentForm(BaseForm):
13
    telephone = forms.CharField(label=_(u'Téléphone'), max_length=10, required=False)
14
    aid = forms.IntegerField(label=u'Aid', required=False)
15
    prenom = forms.CharField(label=_(u'Prénom'), max_length=40, required=False)
16 17
    mail = forms.EmailField(label=u'Mail', required=False)

18 19

class FactureForm(forms.Form):
20 21
    fid = forms.IntegerField(label=u'Fid', required=False)

22 23 24 25
class ClubForm(forms.Form):
    uid_club = forms.CharField(label=u'Login', max_length=40, required=False)
    local = forms.CharField(label=_(u'Local'), max_length=5, required=False)
    nom_club = forms.CharField(label=_(u'Nom'), max_length=40, required=False)
26 27
    cid = forms.IntegerField(label=u'Cid', required=False)

28
class MachineForm(forms.Form):
29
    host = forms.CharField(label=_(u'Nom de machine'), max_length=40, required=False)
30 31
    mac_address = forms.CharField(label=u'Mac', max_length=17, required=False)
    ip_host_number = forms.CharField(label=u'IP', max_length=16, required=False)
32 33 34
    mid = forms.IntegerField(label=u'Mid', required=False)


35