def view(request): response = HttpResponse('blah') response.set_cookie('cookie_name', 'cookie_value')