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