diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-06-07 11:50:20 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-06-07 11:50:20 +0200 |
| commit | 17f3e9258e6050c274a7294213bd08bb71f2d2da (patch) | |
| tree | 9b9e53d12173d3277278e69670ec8430d521d4b1 /django | |
| parent | 4ce5a5fe7806e3dd0ea0d7c53c0d6d831a0edac8 (diff) | |
Fixed #18397 -- Avoided referencing lawrence.com.
This commit includes multiple small related changes, see the ticket
for a full discussion.
Diffstat (limited to 'django')
| -rw-r--r-- | django/conf/global_settings.py | 12 | ||||
| -rw-r--r-- | django/conf/project_template/project_name/settings.py | 8 | ||||
| -rw-r--r-- | django/contrib/messages/tests/cookie.py | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index 4711baad66..13f7991b57 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -270,19 +270,19 @@ SECRET_KEY = '' DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' # Absolute filesystem path to the directory that will hold user-uploaded files. -# Example: "/home/media/media.lawrence.com/media/" +# Example: "/var/www/example.com/media/" MEDIA_ROOT = '' # URL that handles the media served from MEDIA_ROOT. -# Example: "http://media.lawrence.com/media/" +# Examples: "http://example.com/media/", "http://media.example.com/" MEDIA_URL = '' -# Absolute path to the directory that holds static files. -# Example: "/home/media/media.lawrence.com/static/" +# Absolute path to the directory static files should be collected to. +# Example: "/var/www/example.com/static/" STATIC_ROOT = '' # URL that handles the static files served from STATIC_ROOT. -# Example: "http://media.lawrence.com/static/" +# Example: "http://example.com/static/", "http://static.example.com/" STATIC_URL = None # List of upload handler classes to be applied in order. @@ -451,7 +451,7 @@ MIDDLEWARE_CLASSES = ( SESSION_COOKIE_NAME = 'sessionid' # Cookie name. This can be whatever you want. SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # Age of cookie, in seconds (default: 2 weeks). -SESSION_COOKIE_DOMAIN = None # A string like ".lawrence.com", or None for standard domain cookie. +SESSION_COOKIE_DOMAIN = None # A string like ".example.com", or None for standard domain cookie. SESSION_COOKIE_SECURE = False # Whether the session cookie should be secure (https:// only). SESSION_COOKIE_PATH = '/' # The path of the session cookie. SESSION_COOKIE_HTTPONLY = True # Whether to use the non-RFC standard httpOnly flag (IE, FF3+, others) diff --git a/django/conf/project_template/project_name/settings.py b/django/conf/project_template/project_name/settings.py index 0eccc4eaf5..99590d6fd5 100644 --- a/django/conf/project_template/project_name/settings.py +++ b/django/conf/project_template/project_name/settings.py @@ -44,22 +44,22 @@ USE_L10N = True USE_TZ = True # Absolute filesystem path to the directory that will hold user-uploaded files. -# Example: "/home/media/media.lawrence.com/media/" +# Example: "/var/www/example.com/media/" MEDIA_ROOT = '' # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash. -# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" +# Examples: "http://example.com/media/", "http://media.example.com/" MEDIA_URL = '' # Absolute path to the directory static files should be collected to. # Don't put anything in this directory yourself; store your static files # in apps' "static/" subdirectories and in STATICFILES_DIRS. -# Example: "/home/media/media.lawrence.com/static/" +# Example: "/var/www/example.com/static/" STATIC_ROOT = '' # URL prefix for static files. -# Example: "http://media.lawrence.com/static/" +# Example: "http://example.com/static/", "http://static.example.com/" STATIC_URL = '/static/' # Additional locations of static files diff --git a/django/contrib/messages/tests/cookie.py b/django/contrib/messages/tests/cookie.py index 19d0e08384..477eb72e56 100644 --- a/django/contrib/messages/tests/cookie.py +++ b/django/contrib/messages/tests/cookie.py @@ -39,7 +39,7 @@ def stored_cookie_messages_count(storage, response): return len(data) -@override_settings(SESSION_COOKIE_DOMAIN='.lawrence.com') +@override_settings(SESSION_COOKIE_DOMAIN='.example.com') class CookieTest(BaseTest): storage_class = CookieStorage @@ -65,7 +65,7 @@ class CookieTest(BaseTest): storage.add(constants.INFO, 'test') storage.update(response) self.assertTrue('test' in response.cookies['messages'].value) - self.assertEqual(response.cookies['messages']['domain'], '.lawrence.com') + self.assertEqual(response.cookies['messages']['domain'], '.example.com') self.assertEqual(response.cookies['messages']['expires'], '') # Test after the messages have been consumed @@ -76,7 +76,7 @@ class CookieTest(BaseTest): pass # Iterate through the storage to simulate consumption of messages. storage.update(response) self.assertEqual(response.cookies['messages'].value, '') - self.assertEqual(response.cookies['messages']['domain'], '.lawrence.com') + self.assertEqual(response.cookies['messages']['domain'], '.example.com') self.assertEqual(response.cookies['messages']['expires'], 'Thu, 01-Jan-1970 00:00:00 GMT') def test_get_bad_cookie(self): |
