我们从Python开源项目中,提取了以下29个代码示例,用于说明如何使用django.conf.settings.SESSION_EXPIRE_AT_BROWSER_CLOSE。
def get_expire_at_browser_close(self): """ Returns ``True`` if the session is set to expire when the browser closes, and ``False`` if there's an expiry date. Use ``get_expiry_date()`` or ``get_expiry_age()`` to find the actual expiry date/age, if there is one. """ if self.get('_session_expiry') is None: return settings.SESSION_EXPIRE_AT_BROWSER_CLOSE return self.get('_session_expiry') == 0
def __init__(self): if not settings.SESSION_EXPIRE_AT_BROWSER_CLOSE: raise ImproperlyConfigured( 'SessionTimeoutMiddleware expects ' 'SESSION_EXPIRE_AT_BROWSER_CLOSE to be True.')