def set_device(request, device=""):
    response = redirect(add_cache_bypass(next_url(request) or "/"))
    set_cookie(response, "mezzanine-device", device, 60 * 60 * 24 * 365)
    return response
Sets a device name in a cookie when a user explicitly wants to go
dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/core/views.py/set_device