Chercheurs: ajout d'attributs dans modele
[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
00755d9b 14 fields = ('nationalite', 'groupes')
7c596de2 15
00755d9b
AJ
16class PublicationForm(forms.ModelForm):
17 class Meta:
18 model = Publication
dab519fa 19
7c596de2
AJ
20class EtablissementForm(forms.ModelForm):
21 class Meta:
22 model = Chercheur
23 fields = ('etablissement',)
24
00755d9b
AJ
25class EtablissementAutreForm(forms.ModelForm):
26 class Meta:
27 model = Chercheur
28 fields = ('etablissement_autre_nom', 'etablissement_autre_pays', )
29
7c596de2
AJ
30class DisciplineForm(forms.ModelForm):
31 class Meta:
32 model = Chercheur
00755d9b 33 fields = ('discipline', 'expertise', 'mots_cles', 'url')
13146d99 34
b3e1079e
AJ
35class PersonneEditForm(forms.ModelForm):
36 class Meta:
37 model = Personne
38 fields = ('nom', 'prenom', 'genre')
39
13146d99
AJ
40
41class RepertoireSearchForm (forms.Form):
42 mots_cles = forms.CharField (required = False, label="Mots-clés")
43 discipline = forms.ModelChoiceField(queryset=Discipline.objects.all(), required=False, label="Champ disciplinaire", empty_label="Tous")
44 fonction = forms.ChoiceField(choices=(('','Tous'),)+FONCTION_CHOICES, required=False, label="Fonction")
45 pays = forms.ModelChoiceField(queryset=Pays.objects.all().order_by("nom"), required=False, label="Localisation", empty_label="Tous")
46 genre = forms.ChoiceField(choices=(('','Tous'),)+GENRE_CHOICES, required=False, label="Sexe")