Organizations
This package contains all views related to organizations
Organization Actions
This module contains action methods for organizations (archive, restore)
- integreat_cms.cms.views.organizations.organization_actions.archive(request: HttpRequest, region_slug: str, organization_id: int) HttpResponseRedirect[source]
Set archived flag for an organization
- integreat_cms.cms.views.organizations.organization_actions.delete(request: HttpRequest, region_slug: str, organization_id: int) HttpResponseRedirect[source]
Delete a single organization
Organization Bulk Actions
- class integreat_cms.cms.views.organizations.organization_bulk_actions.ArchiveBulkAction(**kwargs)[source]
Bases:
OrganizationBulkActionBulk action for archiving multiple organizations
- post(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]
Function to archive multiple organizations at once
- Parameters:
request (HttpRequest) – The current request
*args (Any) – The supplied arguments
**kwargs (Any) – The supplied keyword arguments
- Returns:
The redirect
- Return type:
HttpResponse
- class integreat_cms.cms.views.organizations.organization_bulk_actions.DeleteBulkAction(**kwargs)[source]
Bases:
OrganizationBulkActionBulk action for deleting multiple organizations
- get_permission_required() tuple[str][source]
This method overwrites get_permission_required() :return: The needed permission to delete contacts
- post(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]
Function to delete multiple organizations at once
- Parameters:
request (HttpRequest) – The current request
*args (Any) – The supplied arguments
**kwargs (Any) – The supplied keyword arguments
- Returns:
The redirect
- Return type:
HttpResponse
- class integreat_cms.cms.views.organizations.organization_bulk_actions.OrganizationBulkAction(**kwargs)[source]
Bases:
BulkActionViewView for executing organization bulk actions
- model[source]
The model of this
BulkActionView- Parameters:
id (BigAutoField) – Primary key: ID
name (CharField) – Name
slug (SlugField) – Slug. Unique string identifier without spaces and special characters.
last_updated (DateTimeField) – Modification date
created_date (DateTimeField) – Creation date
website (URLField) – Website
archived (BooleanField) – Archived
Relationship fields:
- Parameters:
icon (
ForeignKeytoMediaFile) – Logo (related name:icon_organizations)region (
ForeignKeytoRegion) – Region (related name:organizations)links (
GenericRelationtoLink) – Links (related name:organization)
Reverse relationships:
- Parameters:
pois (Reverse
ForeignKeyfromPOI) – All pois of this organization (related name oforganization)pages (Reverse
ForeignKeyfromPage) – All pages of this organization (related name oforganization)members (Reverse
ForeignKeyfromUser) – All members of this organization (related name oforganization)
alias of
Organization
- class integreat_cms.cms.views.organizations.organization_bulk_actions.RestoreBulkAction(**kwargs)[source]
Bases:
OrganizationBulkActionBulk action for restoring multiple organizations
- post(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]
Function to restore multiple organizations at once
- Parameters:
request (HttpRequest) – The current request
*args (Any) – The supplied arguments
**kwargs (Any) – The supplied keyword arguments
- Returns:
The redirect
- Return type:
HttpResponse
Organization Content Mixin
- class integreat_cms.cms.views.organizations.organization_content_mixin.OrganizationContextMixin[source]
Bases:
ContextMixinThis mixin provides extra context for organization views
Organization Form View
- class integreat_cms.cms.views.organizations.organization_form_view.OrganizationFormView(**kwargs)[source]
Bases:
TemplateView,OrganizationContextMixin,MediaContextMixinClass for rendering the organizations form
- get(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]
Render organization form for HTTP GET requests
- Parameters:
request (HttpRequest) – Object representing the user call
*args (Any) – The supplied arguments
**kwargs (Any) – The supplied keyword arguments
- Returns:
The rendered template response
- Return type:
HttpResponse
- post(request: HttpRequest, **kwargs: Any) HttpResponse[source]
Save organization form for HTTP POST requests
- Parameters:
request (HttpRequest) – Object representing the user call
**kwargs (Any) – The supplied keyword arguments
- Returns:
The rendered template response
- Return type:
HttpResponse
- template_name = 'organizations/organization_form.html'[source]
The template to render (see
TemplateResponseMixin)
Organization List View
- class integreat_cms.cms.views.organizations.organization_list_view.OrganizationListView(**kwargs)[source]
Bases:
TemplateView,OrganizationContextMixinView for listing organizations (either non-archived or archived organizations depending on
archived)- archived = False[source]
Whether or not to show archived organizations
- get(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]
Render organizations list for HTTP GET requests
- Parameters:
request (HttpRequest) – Object representing the user call
*args (Any) – The supplied arguments
**kwargs (Any) – The supplied keyword arguments
- Returns:
The rendered template response
- Return type:
HttpResponse
- post(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]
Apply the query and filter the rendered organizations
- Parameters:
request (HttpRequest) – The current request
*args (Any) – The supplied arguments
**kwargs (Any) – The supplied keyword arguments
- Returns:
The rendered template response
- Return type:
HttpResponse
- template_name = 'organizations/organization_list.html'[source]
Template for list of non-archived organizations