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/contenttypes_tests/tests.py b/tests/contenttypes_tests/tests.py | |
index 2d86dfa..9e5eaf5 100644 | |
--- a/tests/contenttypes_tests/tests.py | |
+++ b/tests/contenttypes_tests/tests.py | |
@@ -7,12 +7,10 @@ from django.contrib.contenttypes.fields import ( | |
) | |
from django.contrib.contenttypes.models import ContentType | |
from django.core import checks | |
-from django.db import models, router, connections | |
-from django.db.utils import ConnectionRouter |
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
django-admin.py test gallery |
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/prefetch_related/tests.py b/tests/prefetch_related/tests.py | |
index 6732e45..41fb896 100644 | |
--- a/tests/prefetch_related/tests.py | |
+++ b/tests/prefetch_related/tests.py | |
@@ -508,6 +508,11 @@ class CustomPrefetchTests(TestCase): | |
self.assertEqual(lst2[0].houses_lst[0].rooms_lst[1], self.room1_2) | |
self.assertEqual(len(lst2[1].houses_lst), 0) | |
+ # Aymeric's regression | |
+ with self.assertNumQueries(2): |
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/contrib/gis/tests/tests.py b/django/contrib/gis/tests/tests.py | |
index cc52d24..540d495 100644 | |
--- a/django/contrib/gis/tests/tests.py | |
+++ b/django/contrib/gis/tests/tests.py | |
@@ -16,7 +16,7 @@ except ImproperlyConfigured as e: | |
# an ImportError into an ImproperlyConfigured. | |
# Here, we make sure we're only catching this specific case and not another | |
# ImproperlyConfigured one. | |
- if e.args and e.args[0].startswith('Could not import user-defined GEOMETRY_BACKEND'): | |
+ if e.args and e.args[0] and e.args[0].startswith('Could not import user-defined GEOMETRY_BACKEND'): |
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/contrib/gis/tests/tests.py b/django/contrib/gis/tests/tests.py | |
index cc52d24..540d495 100644 | |
--- a/django/contrib/gis/tests/tests.py | |
+++ b/django/contrib/gis/tests/tests.py | |
@@ -16,7 +16,7 @@ except ImproperlyConfigured as e: | |
# an ImportError into an ImproperlyConfigured. | |
# Here, we make sure we're only catching this specific case and not another | |
# ImproperlyConfigured one. | |
- if e.args and e.args[0].startswith('Could not import user-defined GEOMETRY_BACKEND'): | |
+ if e.args and e.args[0] and e.args[0].startswith('Could not import user-defined GEOMETRY_BACKEND'): |
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
04:52 cramm: so, I think the patch that gives .values() the ability to specify aliases, e.g. values(foo='field__at_the_end_of_a_chain__of__related_models') is in good shape | |
04:56 cramm: what I'm still fighting against is to get chaining of values(alias=...).aggregate(expression involving alias) and values(alias=...).annotate(expression involving alias) to work | |
04:58 cramm: but a good group of other QS chaining constructs do work: https://github.com/django/django/pull/2510/files#diff-db5fb8fdfbba5c6ac7595dd636d9b558R254 | |
04:58 edbaffei has left IRC (Quit: edbaffei) | |
04:59 cramm: do you gouys whing it would be worthwhile to commit^Wask for review this in two parts? the one that is working now and the other once I can tame it and/or get some help? | |
05:01 jkocherhans has left IRC (Quit: Textual IRC Client: www.textualapp.com) | |
05:07 dlogs has joined ([email protected]) | |
05:09 ojii has left IRC (Ping timeout: 256 seconds) | |
05:20 tonebot has left IRC (Remote host closed the connection) | |
05:20 tonebot has joined (~node |
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/mezzanine/generic/fields.py b/mezzanine/generic/fields.py | |
index 8d8dd94..e95de37 100644 | |
--- a/mezzanine/generic/fields.py | |
+++ b/mezzanine/generic/fields.py | |
@@ -134,6 +134,12 @@ class BaseGenericRelation(GenericRelation): | |
""" | |
pass | |
+ def value_from_object(self, obj): | |
+ """ |
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/base.py b/django/db/models/base.py | |
index a0f43de..d481e13 100644 | |
--- a/django/db/models/base.py | |
+++ b/django/db/models/base.py | |
@@ -648,23 +648,25 @@ class Model(six.with_metaclass(ModelBase)): | |
""" | |
meta = cls._meta | |
for parent, field in meta.parents.items(): | |
+ self._save_parents(cls=parent, using=using, update_fields=update_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/django/db/models/base.py b/django/db/models/base.py | |
index a0f43de..a6b5bb0 100644 | |
--- a/django/db/models/base.py | |
+++ b/django/db/models/base.py | |
@@ -648,23 +648,25 @@ class Model(six.with_metaclass(ModelBase)): | |
""" | |
meta = cls._meta | |
for parent, field in meta.parents.items(): | |
+ self._save_parents(cls=parent, using=using, update_fields=update_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/runtests.py b/tests/runtests.py | |
index e852346..0506532 100755 | |
--- a/tests/runtests.py | |
+++ b/tests/runtests.py | |
@@ -19,6 +19,15 @@ from django.utils import six | |
warnings.simplefilter("default", RemovedInDjango19Warning) | |
warnings.simplefilter("default", RemovedInDjango20Warning) | |
+ | |
+import traceback |