Skip to content

Instantly share code, notes, and snippets.

Pinder Johal pinder

Block or report user

Report or block pinder

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pinder /
Last active Dec 23, 2015 — forked from jzylks/
Updated for Django 1.4, with httponly support
from types import MethodType
from django.http import SimpleCookie, HttpRequest
def _set_cookie(self, key, value='', max_age=None, expires=None, path='/',
domain=None, secure=False, httponly=False):
self._resp_cookies[key] = value
self.COOKIES[key] = value
if max_age is not None:
You can’t perform that action at this time.