Beispiel #1
0
def _portal_view(request, portal, portal_path):
    if 'action' in request.GET:
        action = request.GET['action']
    else:
        action = DEFAULT_ACTION_NAME

    request.portal = portal
    request.action = action

    if action in node_actions:
        request.current_node = resolve_path(request.portal, portal_path)
        view = node_actions[action]
    elif action in portal_actions:
        view = portal_actions[action]
    else:
        raise Http404

    return view(request)
Beispiel #2
0
def _portal_view(request, portal, portal_path):
    if 'action' in request.GET:
        action = request.GET['action']
    else:
        action = DEFAULT_ACTION_NAME

    request.portal = portal
    request.action = action

    if action in node_actions:
        request.current_node = resolve_path(request.portal, portal_path)
        view = node_actions[action]
    elif action in portal_actions:
        view = portal_actions[action]
    else:
        raise Http404

    return view(request)