Skip to content

Instantly share code, notes, and snippets.

@sleepless-se
Last active January 5, 2021 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sleepless-se/9945faee8458b0e44054a8f500187bce to your computer and use it in GitHub Desktop.
Save sleepless-se/9945faee8458b0e44054a8f500187bce to your computer and use it in GitHub Desktop.
class MyView(TemplateView):
def render_to_response(self, context, **response_kwargs):
response = super().render_to_response(context, **response_kwargs)
response.set_cookie("key","value")
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment