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
# encoding: utf8 | |
from django.db import models, migrations | |
import datetime | |
class Migration(migrations.Migration): | |
dependencies = [ | |
(u'testapp', u'some_other_one'), | |
] |
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 82e7725..a874b3a 100644 | |
--- a/django/db/models/fields/related.py | |
+++ b/django/db/models/fields/related.py | |
@@ -173,21 +173,24 @@ class SingleRelatedObjectDescriptor(six.with_metaclass(RenameRelatedObjectDescri | |
return self.related.model._base_manager.db_manager(hints=hints) | |
def get_prefetch_queryset(self, instances, queryset=None): | |
- if queryset is not None: | |
- raise ValueError("Custom queryset can't be used for this lookup.") |
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
loic84: (TODO: this nomenclature is confusing, can we invent something better) "lookup operator"? | |
13:57 akaariai: loic84: which part does it refer to in relatedfield__datefield__year__gt=2013? | |
13:57 loic84: __gt | |
13:57 akaariai: ok, sounds good | |
13:58 akaariai: the relatedfield__datefield__year__gt is lookup, relatedfield__datefield is fields part, year is what? | |
13:58 loic84: 2013 could be the "lookup value" | |
13:58 akaariai: loic84: yes | |
13:59 loic84: hum year... | |
14:00 loic84: maybe "year__gt" is the operator? | |
14:00 akaariai: loic84: ok, gt is final operator? (Implemented by Lookup class...) |
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/staticfiles/finders.py b/django/contrib/staticfiles/finders.py | |
index eede6fb..eed88a0 100644 | |
--- a/django/contrib/staticfiles/finders.py | |
+++ b/django/contrib/staticfiles/finders.py | |
@@ -57,7 +57,7 @@ class FileSystemFinder(BaseFinder): | |
prefix, root = root | |
else: | |
prefix = '' | |
- if os.path.abspath(settings.STATIC_ROOT) == os.path.abspath(root): | |
+ if settings.STATIC_ROOT and os.path.abspath(settings.STATIC_ROOT) == os.path.abspath(root): |
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/staticfiles/finders.py b/django/contrib/staticfiles/finders.py | |
index eede6fb..eed88a0 100644 | |
--- a/django/contrib/staticfiles/finders.py | |
+++ b/django/contrib/staticfiles/finders.py | |
@@ -57,7 +57,7 @@ class FileSystemFinder(BaseFinder): | |
prefix, root = root | |
else: | |
prefix = '' | |
- if os.path.abspath(settings.STATIC_ROOT) == os.path.abspath(root): | |
+ if settings.STATIC_ROOT and os.path.abspath(settings.STATIC_ROOT) == os.path.abspath(root): |
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/forms/utils.py b/django/forms/utils.py | |
index 3582384..4d44d28 100644 | |
--- a/django/forms/utils.py | |
+++ b/django/forms/utils.py | |
@@ -127,6 +127,10 @@ class ErrorList(UserList): | |
return list(error)[0] | |
return force_text(error) | |
+ @classmethod | |
+ def __instancecheck__(cls, instance): |
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/auth/management/__init__.py b/django/contrib/auth/management/__init__.py | |
index 5f24bf0..8cc14894 100644 | |
--- a/django/contrib/auth/management/__init__.py | |
+++ b/django/contrib/auth/management/__init__.py | |
@@ -89,6 +89,7 @@ def create_permissions(app, created_models, verbosity, db=DEFAULT_DB_ALIAS, **kw | |
# Find all the Permissions that have a content_type for a model we're | |
# looking for. We don't need to check for codenames since we already have | |
# a list of the ones we're going to create. | |
+ print len(ctypes) | |
all_perms = set(auth_app.Permission.objects.using(db).filter( |
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/auth/management/__init__.py b/django/contrib/auth/management/__init__.py | |
index 5f24bf0..d060f29 100644 | |
--- a/django/contrib/auth/management/__init__.py | |
+++ b/django/contrib/auth/management/__init__.py | |
@@ -89,6 +89,8 @@ def create_permissions(app, created_models, verbosity, db=DEFAULT_DB_ALIAS, **kw | |
# Find all the Permissions that have a content_type for a model we're | |
# looking for. We don't need to check for codenames since we already have | |
# a list of the ones we're going to create. | |
+ print ctypes | |
+ print len(ctypes) |
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/migrations/test_bug/0001_initial.py b/tests/migrations/test_bug/0001_initial.py | |
new file mode 100644 | |
index 0000000..b07efdf | |
--- /dev/null | |
+++ b/tests/migrations/test_bug/0001_initial.py | |
@@ -0,0 +1,13 @@ | |
+from django.db import migrations, models | |
+ | |
+ | |
+class Migration(migrations.Migration): |
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
# encoding: utf8 | |
from django.db import models, migrations | |
class Migration(migrations.Migration): | |
dependencies = [('workflows', '0003_auto_20131212_2349')] | |
operations = [ | |
migrations.AddField( |