akvo.rsr.views.utils module

Akvo RSR is covered by the GNU Affero General Public License.

See more details in the license.txt file located at the root folder of the Akvo RSR module. For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.

akvo.rsr.views.utils.apply_keywords(page, project_qs)[source]

Apply keywords.

If keywords exist, check if they should be used for filtering or exclusion.

akvo.rsr.views.utils.check_project_viewing_permissions(request, project)[source]

Checks if the current user can view a project, otherwise raises PermissionDenied.

A user can view any public project, but when a project is private or not published the user should be logged in and able to make changes to the project (e.g. be an admin of the project).

akvo.rsr.views.utils.get_hierarchy_grid(project, include_private=False)[source]

Return a hierarchy grid for a project

akvo.rsr.views.utils.org_projects(organisation)[source]

Published projects of an organisation.

akvo.rsr.views.utils.show_filter_class(qs, filters)[source]

To simplify template, instead of bool adhere to bootstrap class name.