PonyConf/accounts/forms.py
2016-06-25 12:33:04 +02:00

14 lines
439 B
Python

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