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/validators.py b/django/core/validators.py | |
index e0fd995..236822b 100644 | |
--- a/django/core/validators.py | |
+++ b/django/core/validators.py | |
@@ -66,14 +66,20 @@ class RegexValidator(object): | |
@deconstructible | |
class URLValidator(RegexValidator): | |
+ ul = '\u00a1-\uffff' # unicode letters range (must be a unicode string, not a raw string) | |
+ |
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
concrete (False means virtual) | |
editable (for forms) | |
managed (ignored by migrations if True) | |
is_relation | |
is_forward | |
one_to_one | |
one_to_maby | |
many_to_one | |
many_to_many |
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/management/base.py b/django/core/management/base.py | |
index 910b43e..6ee80a3 100644 | |
--- a/django/core/management/base.py | |
+++ b/django/core/management/base.py | |
@@ -93,8 +93,7 @@ class OutputWrapper(object): | |
ending = self.ending if ending is None else ending | |
if ending and not msg.endswith(ending): | |
msg += ending | |
- style_func = [f for f in (style_func, self.style_func, lambda x:x) | |
- if f is not None][0] |
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/migrations/writer.py b/django/db/migrations/writer.py | |
index 9709eec..e5e9f7a 100644 | |
--- a/django/db/migrations/writer.py | |
+++ b/django/db/migrations/writer.py | |
@@ -352,7 +352,7 @@ class MigrationWriter(object): | |
return string, set(imports) | |
if hasattr(value, "__module__"): | |
module = value.__module__ | |
- if module == 'builtins' if six.PY3 else '__builtin__': | |
+ if module == ('builtins' if six.PY3 else '__builtin__'): |
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/migrations/writer.py b/django/db/migrations/writer.py | |
index 9709eec..35ec996 100644 | |
--- a/django/db/migrations/writer.py | |
+++ b/django/db/migrations/writer.py | |
@@ -352,7 +352,8 @@ class MigrationWriter(object): | |
return string, set(imports) | |
if hasattr(value, "__module__"): | |
module = value.__module__ | |
- if module == 'builtins' if six.PY3 else '__builtin__': | |
+ if (module == 'builtins' |
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 1f580de..af6bf57 100644 | |
--- a/django/db/models/fields/related.py | |
+++ b/django/db/models/fields/related.py | |
@@ -370,7 +370,12 @@ class SingleRelatedObjectDescriptor(object): | |
return hasattr(instance, self.cache_name) | |
def get_queryset(self, **hints): | |
- return self.related.model._base_manager.db_manager(hints=hints).all() | |
+ manager = self.related.model._default_manager |
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 bd52d8e..1f580de 100644 | |
--- a/django/db/models/fields/related.py | |
+++ b/django/db/models/fields/related.py | |
@@ -370,14 +370,11 @@ class SingleRelatedObjectDescriptor(object): | |
return hasattr(instance, self.cache_name) | |
def get_queryset(self, **hints): | |
- # Gotcha: we return a `Manager` instance (i.e. not a `QuerySet`)! | |
- return self.related.model._base_manager.db_manager(hints=hints) |
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/manager.py b/django/db/models/manager.py | |
index 5510b7d..8b11699 100644 | |
--- a/django/db/models/manager.py | |
+++ b/django/db/models/manager.py | |
@@ -174,7 +174,7 @@ class BaseManager(object): | |
Returns a new QuerySet object. Subclasses can override this method to | |
easily customize the behavior of the Manager. | |
""" | |
- return self._queryset_class(self.model, using=self._db, hints=self._hints) | |
+ return self._queryset_class(self.model, using=self._db, hints=self._hints).get_initial_queryset() |
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/query.py b/django/db/models/query.py | |
index f114759..d5d4243 100644 | |
--- a/django/db/models/query.py | |
+++ b/django/db/models/query.py | |
@@ -65,7 +65,7 @@ class QuerySet(object): | |
def get_initial_queryset(self): | |
""" | |
- Hook to set the initial state of a queryset. | |
+ Hook to provide a default state for custom QuerySet. |
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/encoding.py b/django/utils/encoding.py | |
index 6a2f877..21712bc 100644 | |
--- a/django/utils/encoding.py | |
+++ b/django/utils/encoding.py | |
@@ -1,3 +1,4 @@ | |
+# -*- encoding: utf-8 -*- | |
from __future__ import unicode_literals | |
import codecs | |
@@ -188,7 +189,9 @@ def iri_to_uri(iri): |