cookie.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:Gypsy 作者: benticarlos 项目源码 文件源码
def _update_cookie(self, encoded_data, response):
        """
        Either sets the cookie with the encoded data if there is any data to
        store, or deletes the cookie.
        """
        if encoded_data:
            response.set_cookie(
                self.cookie_name, encoded_data,
                domain=settings.SESSION_COOKIE_DOMAIN,
                secure=settings.SESSION_COOKIE_SECURE or None,
                httponly=settings.SESSION_COOKIE_HTTPONLY or None,
            )
        else:
            response.delete_cookie(self.cookie_name, domain=settings.SESSION_COOKIE_DOMAIN)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号