8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-30 16:42:25 +00:00
re2o/search/models.py

20 lines
756 B
Python
Raw Normal View History

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.
CHOICES = (
('0', 'Actifs'),
('1', 'Désactivés'),
('2', 'Archivés'),
)
2016-07-03 16:09:58 +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")