def mobile_view(request, url='/'):
    "Returns the same page in mobile view"

    if not url:
        url = '/'

    view, args, kwargs = resolve(url)

    if view == mobile_view:
        raise Http404("OMG, I see myself!")

    kwargs['request'] = request
    kwargs['response_format'] = 'html'
    response = view(*args, **kwargs)

    # response = csrf().process_response(request, response)

    if response.status_code == 302 and not response['Location'][:2] == '/m':
        response['Location'] = '/m' + response['Location']

    return response
dataset/ETHPy150Open treeio/treeio/treeio/core/views.py/mobile_view/original