fairdm.contrib.contributors.forms.person#
Forms for signup and merging people.
Module Contents#
Classes#
Collect first and last names during allauth signup. |
|
Choose the person that survives when another person is merged into them. |
Data#
API#
- User#
‘get_user_model(…)’
- class SignupExtraForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)#
Bases:
django.forms.ModelFormCollect first and last names during allauth signup.
Attributes: first_name: The given name. last_name: The family name.
Initialization
- first_name#
‘CharField(…)’
- last_name#
‘CharField(…)’
- class Meta#
- model#
‘get_user_model(…)’
- fields#
(‘first_name’, ‘last_name’)
- labels#
None
- help_texts#
None
- signup(request, user)#
Save the user’s first and last name.
Args: request: The signup request. user: The new user.
- class MergePersonForm(*args, exclude_pk=None, **kwargs)#
Bases:
django.forms.FormChoose the person that survives when another person is merged into them.
Args: *args: Passed to
Form. exclude_pk: Primary key of the person being merged, who is left out of the choices. **kwargs: Passed toForm.Attributes: merge_into: The person that survives.
Initialization
- merge_into#
‘PersonChoiceField(…)’
- clean_merge_into()#
Refuse the person being merged as the person that survives.