[Python-modules-commits] [django-taggit] 01/03: Imported Upstream version 0.17.1
Michal Cihar
nijel at moszumanska.debian.org
Thu Sep 17 07:49:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
nijel pushed a commit to branch master
in repository django-taggit.
commit dde9ce354505cbdde071fd5ec89462751a2a323f
Author: Michal Čihař <nijel at debian.org>
Date: Thu Sep 17 09:47:11 2015 +0200
Imported Upstream version 0.17.1
---
CHANGELOG.txt | 5 +++++
PKG-INFO | 2 +-
django_taggit.egg-info/PKG-INFO | 2 +-
docs/admin.txt | 2 +-
taggit/__init__.py | 2 +-
taggit/managers.py | 3 +--
tests/__init__.pyc | Bin 144 -> 144 bytes
tests/forms.pyc | Bin 2548 -> 2146 bytes
tests/models.pyc | Bin 13839 -> 11096 bytes
tests/tests.py | 11 ++++++++++-
tests/tests.pyc | Bin 35511 -> 31439 bytes
11 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index a3e6ae8..de6cb80 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,11 @@
Changelog
=========
+0.17.1 (2015-09-10)
+~~~~~~~~~~~~~~~~~~~
+ * Fix unknown column `object_id` issue with Django 1.6+
+ * https://github.com/alex/django-taggit/pull/305
+
0.17.0 (2015-08-14)
~~~~~~~~~~~~~~~~~~~
* Database index added on TaggedItem fields content_type & object_id
diff --git a/PKG-INFO b/PKG-INFO
index 2139e06..3ec2e15 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-taggit
-Version: 0.17.0
+Version: 0.17.1
Summary: django-taggit is a reusable Django application for simple tagging.
Home-page: http://github.com/alex/django-taggit/tree/master
Author: Alex Gaynor
diff --git a/django_taggit.egg-info/PKG-INFO b/django_taggit.egg-info/PKG-INFO
index 2139e06..3ec2e15 100644
--- a/django_taggit.egg-info/PKG-INFO
+++ b/django_taggit.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-taggit
-Version: 0.17.0
+Version: 0.17.1
Summary: django-taggit is a reusable Django application for simple tagging.
Home-page: http://github.com/alex/django-taggit/tree/master
Author: Alex Gaynor
diff --git a/docs/admin.txt b/docs/admin.txt
index fd6917a..35f3c71 100644
--- a/docs/admin.txt
+++ b/docs/admin.txt
@@ -11,4 +11,4 @@ like::
This is for the same reason that you cannot include a :class:`ManyToManyField`,
it would result in an unreasonable number of queries being executed. If you really would like to add it, you can read the
-`Django documentation <http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display>`_.
+`Django documentation <http://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display>`_.
diff --git a/taggit/__init__.py b/taggit/__init__.py
index 8e148b4..d3c9b69 100644
--- a/taggit/__init__.py
+++ b/taggit/__init__.py
@@ -1 +1 @@
-VERSION = (0, 17, 0)
+VERSION = (0, 17, 1)
diff --git a/taggit/managers.py b/taggit/managers.py
index bb2ccd4..a17c145 100644
--- a/taggit/managers.py
+++ b/taggit/managers.py
@@ -484,14 +484,13 @@ class TaggableManager(RelatedField, Field):
pathinfos = []
from_field = self.model._meta.pk
opts = self.through._meta
- object_id_field = _get_field(self.through, 'object_id')
linkfield = _get_field(self.through, self.m2m_reverse_field_name())
if direct:
join1infos = [PathInfo(self.model._meta, opts, [from_field], self.rel, True, False)]
join2infos = linkfield.get_path_info()
else:
join1infos = linkfield.get_reverse_path_info()
- join2infos = [PathInfo(opts, self.model._meta, [object_id_field], self, True, False)]
+ join2infos = [PathInfo(opts, self.model._meta, [from_field], self, True, False)]
pathinfos.extend(join1infos)
pathinfos.extend(join2infos)
return pathinfos
diff --git a/tests/__init__.pyc b/tests/__init__.pyc
index 7b06e2a..4ae1c61 100644
Binary files a/tests/__init__.pyc and b/tests/__init__.pyc differ
diff --git a/tests/forms.pyc b/tests/forms.pyc
index c43fb17..40bca6a 100644
Binary files a/tests/forms.pyc and b/tests/forms.pyc differ
diff --git a/tests/models.pyc b/tests/models.pyc
index fe664c3..c3eafa5 100644
Binary files a/tests/models.pyc and b/tests/models.pyc differ
diff --git a/tests/tests.py b/tests/tests.py
index 157fbeb..0930dd5 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -6,7 +6,7 @@ import django
from django.contrib.contenttypes.models import ContentType
from django.core import serializers
from django.core.exceptions import ImproperlyConfigured, ValidationError
-from django.db import connection
+from django.db import connection, models
from django.test import TestCase, TransactionTestCase
from django.test.utils import override_settings
from django.utils.encoding import force_text
@@ -433,6 +433,15 @@ class TaggableManagerOfficialTestCase(TaggableManagerTestCase):
self.assertEqual(apple, self.food_model.objects.get(tags__official=False))
+ def test_get_tags_with_count(self):
+ apple = self.food_model.objects.create(name="apple")
+ apple.tags.add("red", "green", "delicious")
+ pear = self.food_model.objects.create(name="pear")
+ pear.tags.add("green", "delicious")
+
+ tag_info = self.tag_model.objects.filter(officialfood__in=[apple.id, pear.id],name='green').annotate(models.Count('name'))
+ self.assertEqual(tag_info[0].name__count, 2)
+
class TaggableManagerInitializationTestCase(TaggableManagerTestCase):
"""Make sure manager override defaults and sets correctly."""
food_model = Food
diff --git a/tests/tests.pyc b/tests/tests.pyc
index e6933c2..3e7a630 100644
Binary files a/tests/tests.pyc and b/tests/tests.pyc differ
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/django-taggit.git
More information about the Python-modules-commits
mailing list