PonyConf/accounts/forms.py
Guilhem Saurel d9b3846cf1 Various Stuffs
- unified orga forms
- unified staff / orga | util / mixin / filter
- moved a signal into its signals.py
- profile edition now edits User / Profile / Participation
- topic can be edited
- orga can set topics reviewers
- removed view list-talks-by-speaker (his talks appears on his page)
- everybody can see topics (template show more stuff the more permissions you have)
2016-07-05 01:16:33 +02:00

19 lines
736 B
Python

from django.contrib.auth.models import User
from django.forms.models import modelform_factory
from .models import Participation, Profile
__all__ = ['UserForm', 'ProfileForm', 'ProfileOrgaForm', 'ParticipationOrgaForm']
UserForm = modelform_factory(User, fields=['first_name', 'last_name', 'email', 'username'])
ProfileForm = modelform_factory(Profile, fields=['biography'])
ParticipationForm = modelform_factory(Participation, fields=['transport', 'connector', 'sound', 'constraints'])
ProfileOrgaForm = modelform_factory(Profile, fields=['biography', 'notes'])
ParticipationOrgaForm = modelform_factory(Participation,
fields=['transport', 'connector', 'sound', 'constraints', 'orga'])