Example #1
0
def resource(resource, name):
    ext = negotiate(request.headers.get('Accept'))
    if ext == 'html':
        return redirect(url_for('resource_html', resource=resource,
            name=name), code=303)
    return redirect(url_for('resource_rdf', resource=resource,
        name=name, ext=ext), code=303)
Example #2
0
def top_level_resource():
    ext = negotiate(request.headers.get('Accept'))
    if ext == 'html':
        return redirect(url_for('top_level_resource_html'), code=303)
    return redirect(url_for('top_level_resource_rdf', ext=ext), code=303)