@app.route('/image')
def image(request):

    headers = get_headers(request)
    if 'accept' not in headers:
        return image_png(request)  # Default media type to png

    accept = headers['accept'].lower()

    if 'image/webp' in accept:
        return image_webp(request)
    elif 'image/svg+xml' in accept:
        return image_svg(request)
    elif 'image/jpeg' in accept:
        return image_jpeg(request)
    elif 'image/png' in accept or 'image/*' in accept:
        return image_png(request)
    else:
        return status_code(406)  # Unsupported media type
Called to handle a ManyToManyField.
dataset/ETHPy150Open mozillazg/bustard/tests/httpbin/core.py/image--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/core/serializers/base.py/Serializer.handle_m2m_field