fairdm.core.project.forms#
Forms for creating and editing projects.
Module Contents#
Classes#
Form for editing a project, and the base of |
|
Form for creating a project, asking only for name, status and visibility. |
API#
- class ProjectForm(*args, request=None, **kwargs)#
Bases:
fairdm.core.forms.ManagerOnlyFieldsMixin,fairdm.forms.ModelFormForm for editing a project, and the base of
ProjectCreateForm.For a project that already exists, visibility and owner are offered only to someone who can manage it.
Args: *args: Positional arguments passed to
ModelForm. request: The current request, which decides whether visibility and owner are offered. **kwargs: Keyword arguments passed toModelForm.Attributes: image: Optional cover image. name: The project’s name. status: The project’s stage, from concept to complete. visibility: Who can view the project. owner: The organization that owns the project.
Initialization
- image#
‘ImageField(…)’
- name#
‘CharField(…)’
- status#
‘TypedChoiceField(…)’
- visibility#
‘TypedChoiceField(…)’
- owner#
‘OrganizationChoiceField(…)’
- manager_only_fields#
(‘visibility’, ‘owner’)
- class ProjectCreateForm(*args, **kwargs)#
Bases:
fairdm.core.project.forms.ProjectFormForm for creating a project, asking only for name, status and visibility.
The other fields are available after creation on the update page.
Args: *args: Positional arguments passed to
ProjectForm. **kwargs: Keyword arguments passed toProjectForm.Initialization
- class Meta#
Bases:
fairdm.core.project.forms.ProjectForm- fields#
[‘name’, ‘status’, ‘visibility’]