Version stabilisee
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / savoirs / forms.py
1 # -*- encoding: utf-8 -*-
2 from django import forms
3 from models import Evenement
4
5 class RechercheAvancee (forms.Form):
6 creator = forms.CharField (max_length=60, required=False, \
7 label = "Auteur ou contributeur") # + contributor
8 title = forms.CharField (max_length=100, required=False, \
9 label = "Titre") # + alt_title
10 description = forms.CharField (max_length=100, required=False, \
11 label = "Description ou résumé") # + abstract
12 subject = forms.CharField (max_length=100, required=False, label = "Sujet")
13 operator = forms.ChoiceField (choices = (('or', 'ou'), ('and', 'et')), label = "Operateur")
14 type = forms.CharField (initial='avancee', required=False, widget=forms.HiddenInput)
15
16
17 class EvenementForm(forms.ModelForm):
18 class Meta:
19 model = Evenement
20 exclude = ('approuve', 'uid', 'actif')