2016-07-02 22:27:22 +00:00
|
|
|
from django.db import models
|
|
|
|
from django import forms
|
|
|
|
from django.forms import Form
|
|
|
|
from django.forms import ModelForm
|
|
|
|
|
|
|
|
from users.models import User
|
|
|
|
# Create your models here.
|
|
|
|
|
2016-07-03 22:03:33 +00:00
|
|
|
CHOICES = (
|
|
|
|
('0', 'Actifs'),
|
|
|
|
('1', 'Désactivés'),
|
|
|
|
('2', 'Archivés'),
|
|
|
|
)
|
2016-07-03 16:09:58 +00:00
|
|
|
|
2016-07-03 22:03:33 +00:00
|
|
|
class SearchForm(Form):
|
|
|
|
search_field = forms.CharField(label = 'Search', max_length = 100, required=False)
|
|
|
|
filtre = forms.MultipleChoiceField(label="Filtre utilisateur", required=False, widget =forms.CheckboxSelectMultiple,choices=CHOICES)
|
|
|
|
date_deb = forms.DateField(required=False, label="Date de début", help_text='DD/MM/YYYY', input_formats=['%d/%m/%Y'])
|
|
|
|
date_fin = forms.DateField(required=False, help_text='DD/MM/YYYY', input_formats=['%d/%m/%Y'], label="Date de fin")
|