Skip to content

Misc

organisation_redirect(org_path='')

Redirect requests with the non-american spelling of organisation to the CKAN path.

Parameters:

Name Type Description Default
org_path

additional parts of the path

''
Source code in ckanext/nhm/routes/misc.py
23
24
25
26
27
28
29
30
31
@blueprint.route('/organisation')
@blueprint.route('/organisation/<path:org_path>')
def organisation_redirect(org_path=''):
    """
    Redirect requests with the non-american spelling of organisation to the CKAN path.

    :param org_path: additional parts of the path
    """
    return redirect(f'/organization/{org_path}')

redundancy(random_string=None)

This is a hacky fix for data-portal#422, just so calling this page doesn't return a 404 and fill up the logs.

Source code in ckanext/nhm/routes/misc.py
13
14
15
16
17
18
19
20
@blueprint.route('/tm_reduced_redundancy_<random_string>')
@blueprint.route('/server_status/')
def redundancy(random_string=None):
    """
    This is a hacky fix for data-portal#422, just so calling this page doesn't return a
    404 and fill up the logs.
    """
    return jsonify({})