Changeset 6545
- Timestamp:
- 10/20/07 00:13:56 (9 months ago)
- Files:
-
- django/trunk/django/conf/global_settings.py (modified) (1 diff)
- django/trunk/django/contrib/sessions/middleware.py (modified) (2 diffs)
- django/trunk/docs/settings.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/conf/global_settings.py
r6333 r6545 276 276 SESSION_COOKIE_DOMAIN = None # A string like ".lawrence.com", or None for standard domain cookie. 277 277 SESSION_COOKIE_SECURE = False # Whether the session cookie should be secure (https:// only). 278 SESSION_COOKIE_PATH = '/' # The path of the session cookie. 278 279 SESSION_SAVE_EVERY_REQUEST = False # Whether to save the session data on every request. 279 280 SESSION_EXPIRE_AT_BROWSER_CLOSE = False # Whether sessions expire when a user closes his browser. django/trunk/django/contrib/sessions/middleware.py
r6333 r6545 32 32 max_age = settings.SESSION_COOKIE_AGE 33 33 rfcdate = formatdate(time.time() + settings.SESSION_COOKIE_AGE) 34 34 35 35 # Fixed length date must have '-' separation in the format 36 36 # DD-MMM-YYYY for compliance with Netscape cookie standard … … 40 40 # Save the seesion data and refresh the client cookie. 41 41 request.session.save() 42 response.set_cookie(settings.SESSION_COOKIE_NAME, request.session.session_key, 43 max_age=max_age, expires=expires, domain=settings.SESSION_COOKIE_DOMAIN, 44 secure=settings.SESSION_COOKIE_SECURE or None) 45 42 response.set_cookie(settings.SESSION_COOKIE_NAME, 43 request.session.session_key, max_age=max_age, 44 expires=expires, domain=settings.SESSION_COOKIE_DOMAIN, 45 path=settings.SESSION_COOKIE_PATH, 46 secure=settings.SESSION_COOKIE_SECURE or None) 47 46 48 return response django/trunk/docs/settings.txt
r6534 r6545 476 476 477 477 List of locations of the fixture data files, in search order. Note that 478 these paths should use Unix-style forward slashes, even on Windows. See 478 these paths should use Unix-style forward slashes, even on Windows. See 479 479 `Testing Django Applications`_. 480 480 … … 732 732 Default: Not defined. 733 733 734 A dictionary of modules containing serializer definitions (provided as 735 strings), keyed by a string identifier for that serialization type. For 734 A dictionary of modules containing serializer definitions (provided as 735 strings), keyed by a string identifier for that serialization type. For 736 736 example, to define a YAML serializer, use:: 737 737 … … 755 755 Controls where Django stores session data. Valid values are: 756 756 757 * ``'django.contrib.sessions.backends.db'`` 758 * ``'django.contrib.sessions.backends.file'`` 757 * ``'django.contrib.sessions.backends.db'`` 758 * ``'django.contrib.sessions.backends.file'`` 759 759 * ``'django.contrib.sessions.backends.cache'`` 760 760 761 761 See the `session docs`_ for more details. 762 762 … … 784 784 The name of the cookie to use for sessions. This can be whatever you want. 785 785 See the `session docs`_. 786 787 SESSION_COOKIE_PATH 788 ------------------- 789 790 Default: ``'/'`` 791 792 The path set on the session cookie. Should match the URL path of your Django 793 installation (or be parent of that path). This is useful if you have multiple 794 Django instances running under the same hostname; they can use different 795 cookie paths and each instance will only see its own session cookie. 786 796 787 797 SESSION_COOKIE_SECURE
