This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt | |
index bbd573d..7705edd 100644 | |
--- a/docs/releases/1.8.txt | |
+++ b/docs/releases/1.8.txt | |
@@ -416,11 +416,8 @@ Miscellaneous | |
* ``UserCreationForm.errors_messages['duplicate_username']`` is no longer used. | |
If you wish to customize that error message, :ref:`override it on the form | |
- <considerations-regarding-model-errormessages>` using | |
- ``Meta.errors_messages['unique']`` or, if you have a custom user model, use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt | |
index bbd573d..7407a1f 100644 | |
--- a/docs/releases/1.8.txt | |
+++ b/docs/releases/1.8.txt | |
@@ -416,11 +416,11 @@ Miscellaneous | |
* ``UserCreationForm.errors_messages['duplicate_username']`` is no longer used. | |
If you wish to customize that error message, :ref:`override it on the form | |
- <considerations-regarding-model-errormessages>` using | |
- ``Meta.errors_messages['unique']`` or, if you have a custom user model, use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/django/core/exceptions.py b/django/core/exceptions.py | |
index cf4aea0..2f02c14 100644 | |
--- a/django/core/exceptions.py | |
+++ b/django/core/exceptions.py | |
@@ -141,9 +141,9 @@ class ValidationError(Exception): | |
for field, errors in self.error_dict.items(): | |
error_dict.setdefault(field, []).extend(errors) | |
else: | |
- error_dict = self.error_dict | |
+ error_dict.update(self.error_dict) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py | |
index 985ff8e..f87b684 100644 | |
--- a/tests/forms_tests/tests/test_forms.py | |
+++ b/tests/forms_tests/tests/test_forms.py | |
@@ -740,6 +740,25 @@ class FormsTestCase(TestCase): | |
with six.assertRaisesRegex(self, ValueError, "has no field named"): | |
f.add_error('missing_field', 'Some error.') | |
+ def test_regression_17(self): | |
+ class CodeForm(Form): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/django/utils/version.py b/django/utils/version.py | |
index c680dbd..90a41ad 100644 | |
--- a/django/utils/version.py | |
+++ b/django/utils/version.py | |
@@ -57,6 +57,10 @@ def get_git_changeset(): | |
This value isn't guaranteed to be unique, but collisions are very unlikely, | |
so it's sufficient for generating the development version numbers. | |
""" | |
+ # FIXME: Replace with @lru_cache when we upgrade the docs server to PY2.7+. | |
+ if hasattr(get_git_changeset, 'cache'): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit e0b05dfcd74c803f872500c040cc6de88fcefe45 | |
Author: Loic Bistuer <[email protected]> | |
Date: Thu Jun 12 00:21:14 2014 +0700 | |
Made the vendored NamedTemporaryFile work as a context manager. Refs #22680. | |
This fixes a regression on windows introduced by b7de5f5. | |
Thanks Tim Graham for the report. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit a6340bcc2667d74e3c01da8e0a8e018264d1ba3b | |
Author: Loic Bistuer <[email protected]> | |
Date: Thu Jun 12 00:21:14 2014 +0700 | |
Made the vendored NamedTemporaryFile work as a context manager. Refs #22680. | |
diff --git a/django/core/files/temp.py b/django/core/files/temp.py | |
index 58fbd23..77563ee 100644 | |
--- a/django/core/files/temp.py | |
+++ b/django/core/files/temp.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py | |
index 63da28d..9452b06 100644 | |
--- a/django/db/models/fields/related.py | |
+++ b/django/db/models/fields/related.py | |
@@ -617,9 +617,12 @@ class ReverseSingleRelatedObjectDescriptor(object): | |
if related is not None: | |
setattr(related, self.field.related.get_cache_name(), None) | |
- # Set the value of the related field | |
- for lh_field, rh_field in self.field.related_fields: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/one_to_one/models.py b/tests/one_to_one/models.py | |
index b54cabb..684e4f8 100644 | |
--- a/tests/one_to_one/models.py | |
+++ b/tests/one_to_one/models.py | |
@@ -29,6 +29,8 @@ class Restaurant(models.Model): | |
def __str__(self): | |
return "%s the restaurant" % self.place.name | |
+class Bar(models.Model): | |
+ place = models.OneToOneField(Place, null=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/one_to_one/models.py b/tests/one_to_one/models.py | |
index b54cabb..684e4f8 100644 | |
--- a/tests/one_to_one/models.py | |
+++ b/tests/one_to_one/models.py | |
@@ -29,6 +29,8 @@ class Restaurant(models.Model): | |
def __str__(self): | |
return "%s the restaurant" % self.place.name | |
+class Bar(models.Model): | |
+ place = models.OneToOneField(Place, null=True) |