akvo.rsr.decorators 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.decorators.fetch_project(view)[source]

Retrieve a specific project object from the project_id captured in the URL and passes it directly to the view as ‘p’.

Usage:

@fetch_project def view(request, p):

akvo.rsr.decorators.two_factor_required(view=None, login_url=None)[source]

If a user has enforced_2fa attribute as True, the user should enable 2FA for accessing the page or user will be redirected to 2FA setup page.

akvo.rsr.decorators.with_download_indicator(view)[source]

Read download indicator id from request query parameter and return it as response cookie which then used by frontend to close the download indicator.

Request param:

?did=<unique string id>