#NEWLINE# def set_device( request , device = '' ) : #NEWLINE# #INDENT# '\n    Sets a device name in a cookie when a user explicitly wants to go\n    to the site for a particular device (eg mobile).\n    ' #NEWLINE# response = redirect ( add_cache_bypass ( ( next_url ( request ) or '/' ) ) ) #NEWLINE# set_cookie ( response , 'mezzanine-device' , device , ( ( ( 60 * 60 ) * 24 ) * 365 ) ) #NEWLINE# return response