def frontendediting_request_processor(page, request):
    if 'frontend_editing' not in request.GET:
        return

    response = HttpResponseRedirect(request.path)

    if request.user.has_module_perms('page'):

        if 'frontend_editing' in request.GET:

            try:
                enable_fe = int(request.GET['frontend_editing']) > 0
            except ValueError:
                enable_fe = False

            if enable_fe:
                response.set_cookie(str('frontend_editing'), enable_fe)
                clear_cache()
            else:
                response.delete_cookie(str('frontend_editing'))
                clear_cache()
    else:
        response.delete_cookie(str('frontend_editing'))

    # Redirect to cleanup URLs
    return response
Register navigational element.
dataset/ETHPy150Open django-leonardo/django-leonardo/leonardo/module/web/processors/edit.py/frontendediting_request_processor--crossover with--dataset/ETHPy150Open mbr/flask-nav/flask_nav/__init__.py/Nav.register_element