fairdm.contrib.contributors.forms.person#

Forms for signup and merging people.

Module Contents#

Classes#

SignupExtraForm

Collect first and last names during allauth signup.

MergePersonForm

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.ModelForm

Collect 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.Form

Choose 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 to Form.

Attributes: merge_into: The person that survives.

Initialization

merge_into#

‘PersonChoiceField(…)’

clean_merge_into()#

Refuse the person being merged as the person that survives.