title: set_cookie() missing 1 required positional argument: 'self'
body: <p>In Django, Im trying to render a template and send a cookie at the same time with this code:</p>
  
  <pre><code>template = loader.get_template('list.html')
  context = {'documents': documents, 'form': form}
  
  if ('user') not in request.COOKIES:
      id_user =  ''.join(random.SystemRandom().choice(string.ascii_uppercase + string.ascii_lowercase + string.digits) for _ in range(30))
      HttpResponse.set_cookie(key='user', value=id_user, max_age=63072000)
  
  return HttpResponse(template.render(context, request))
  </code></pre>
  
  <p>But I get the Error:</p>
  
  <blockquote>
    <p>TypeError at /myapp/list/</p>
    
    <p>set_cookie() missing 1 required positional argument: 'self'</p>
  </blockquote>
  
  <p>I have checked the <a href="https://docs.djangoproject.com/en/1.10/ref/request-response/" rel="nofollow">documentation</a>, but I dont find the solution.
  Help me please :)</p>