Merge branch 'master' of gitosis@git.auf:auf_savoirs_en_partage_django
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / chercheurs / forms.py
1 # -*- encoding: utf-8 -*-
2 from django import forms
3 from models import *
4
5
6 class PersonneForm(forms.ModelForm):
7 class Meta:
8 model = Personne
9 fields = ('nom', 'prenom', 'courriel', 'genre')
10
11 class ChercheurForm(forms.ModelForm):
12 class Meta:
13 model = Chercheur
14 fields = ('pays', 'groupes')
15
16 class EtablissementForm(forms.ModelForm):
17 class Meta:
18 model = Chercheur
19 fields = ('etablissement',)
20
21 class DisciplineForm(forms.ModelForm):
22 class Meta:
23 model = Chercheur
24 fields = ('discipline', 'expertise', 'mots_cles', 'url', 'publication1', 'publication2', 'publication3')
25
26
27 class RepertoireSearchForm (forms.Form):
28 mots_cles = forms.CharField (required = False, label="Mots-clés")
29 discipline = forms.ModelChoiceField(queryset=Discipline.objects.all(), required=False, label="Champ disciplinaire", empty_label="Tous")
30 fonction = forms.ChoiceField(choices=(('','Tous'),)+FONCTION_CHOICES, required=False, label="Fonction")
31 pays = forms.ModelChoiceField(queryset=Pays.objects.all().order_by("nom"), required=False, label="Localisation", empty_label="Tous")
32 genre = forms.ChoiceField(choices=(('','Tous'),)+GENRE_CHOICES, required=False, label="Sexe")