[Python-modules-commits] [django-taggit] 01/03: Imported Upstream version 0.20.0

Michal Cihar nijel at moszumanska.debian.org
Tue Jun 21 13:19:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

nijel pushed a commit to branch master
in repository django-taggit.

commit a402e81d4aaea215f703ac76675dcd0622991de0
Author: Michal Čihař <nijel at debian.org>
Date:   Tue Jun 21 15:12:19 2016 +0200

    Imported Upstream version 0.20.0
---
 CHANGELOG.txt                          |  11 +++++++-
 PKG-INFO                               |   4 +--
 README.rst                             |   2 +-
 django_taggit.egg-info/PKG-INFO        |   4 +--
 docs/index.txt                         |   2 +-
 taggit/__init__.py                     |   2 +-
 taggit/locale/ru/LC_MESSAGES/django.mo | Bin 1513 -> 1555 bytes
 taggit/locale/ru/LC_MESSAGES/django.po |   3 +++
 taggit/managers.py                     |   4 +--
 tests/tests.py                         |  47 +++++++++++++++++++++++++++++++++
 10 files changed, 69 insertions(+), 10 deletions(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 09faf62..ecc04ad 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,15 @@
 Changelog
 =========
 
+0.20.0 (2016-06-19)
+~~~~~~~~~~~~~~~~~~~
+ * Fix UnboundLocalError in _TaggableManager.set(..)
+  * https://github.com/alex/django-taggit/pull/418
+ * Update doc links to reflect RTD domain changes
+  * https://github.com/alex/django-taggit/pull/417
+ * Improve Russian translations
+  * https://github.com/alex/django-taggit/pull/416
+
 0.19.1 (2016-05-25)
 ~~~~~~~~~~~~~~~~~~~
  * Add app config, add simplified Chinese translation file
@@ -178,7 +187,7 @@ Changelog
  * Added a Hebrew locale.
  * Added an index on the ``object_id`` field of ``TaggedItem``.
  * When displaying tags always join them with commas, never spaces.
- * The docs are now available `online <http://django-taggit.readthedocs.org/>`_.
+ * The docs are now available `online <https://django-taggit.readthedocs.io/>`_.
  * Custom ``Tag`` models are now allowed.
  * **Backwards incompatible:**  Filtering on tags is no longer
    ``filter(tags__in=["foo"])``, it is written
diff --git a/PKG-INFO b/PKG-INFO
index 3c98279..df979de 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: django-taggit
-Version: 0.19.1
+Version: 0.20.0
 Summary: django-taggit is a reusable Django application for simple tagging.
 Home-page: http://github.com/alex/django-taggit/tree/master
 Author: Alex Gaynor
@@ -46,7 +46,7 @@ Description: django-taggit
         
         ``django-taggit`` requires Django 1.4.5 or greater.
         
-        For more info check out the `documentation <https://django-taggit.readthedocs.org/en/latest/>`_.  And for questions about usage or
+        For more info check out the `documentation <https://django-taggit.readthedocs.io/en/latest/>`_.  And for questions about usage or
         development you can contact the
         `mailinglist <http://groups.google.com/group/django-taggit>`_.
         
diff --git a/README.rst b/README.rst
index 32e5c95..5e4c949 100644
--- a/README.rst
+++ b/README.rst
@@ -38,6 +38,6 @@ Tags will show up for you automatically in forms and the admin.
 
 ``django-taggit`` requires Django 1.4.5 or greater.
 
-For more info check out the `documentation <https://django-taggit.readthedocs.org/en/latest/>`_.  And for questions about usage or
+For more info check out the `documentation <https://django-taggit.readthedocs.io/en/latest/>`_.  And for questions about usage or
 development you can contact the
 `mailinglist <http://groups.google.com/group/django-taggit>`_.
diff --git a/django_taggit.egg-info/PKG-INFO b/django_taggit.egg-info/PKG-INFO
index 3c98279..df979de 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.19.1
+Version: 0.20.0
 Summary: django-taggit is a reusable Django application for simple tagging.
 Home-page: http://github.com/alex/django-taggit/tree/master
 Author: Alex Gaynor
@@ -46,7 +46,7 @@ Description: django-taggit
         
         ``django-taggit`` requires Django 1.4.5 or greater.
         
-        For more info check out the `documentation <https://django-taggit.readthedocs.org/en/latest/>`_.  And for questions about usage or
+        For more info check out the `documentation <https://django-taggit.readthedocs.io/en/latest/>`_.  And for questions about usage or
         development you can contact the
         `mailinglist <http://groups.google.com/group/django-taggit>`_.
         
diff --git a/docs/index.txt b/docs/index.txt
index bc8d077..6ff51c1 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -42,4 +42,4 @@ Indices and tables
 * :ref:`modindex`
 * :ref:`search`
 
-__ http://south.readthedocs.org/en/latest/
+__ https://south.readthedocs.io/en/latest/
diff --git a/taggit/__init__.py b/taggit/__init__.py
index f60adf0..ceb9331 100644
--- a/taggit/__init__.py
+++ b/taggit/__init__.py
@@ -1,3 +1,3 @@
-VERSION = (0, 19, 1)
+VERSION = (0, 20, 0)
 
 default_app_config = 'taggit.apps.TaggitAppConfig'
diff --git a/taggit/locale/ru/LC_MESSAGES/django.mo b/taggit/locale/ru/LC_MESSAGES/django.mo
index 61a7e39..f5b4eb9 100644
Binary files a/taggit/locale/ru/LC_MESSAGES/django.mo and b/taggit/locale/ru/LC_MESSAGES/django.mo differ
diff --git a/taggit/locale/ru/LC_MESSAGES/django.po b/taggit/locale/ru/LC_MESSAGES/django.po
index 6629cba..b3609de 100644
--- a/taggit/locale/ru/LC_MESSAGES/django.po
+++ b/taggit/locale/ru/LC_MESSAGES/django.po
@@ -17,6 +17,9 @@ msgstr ""
 "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
 "X-Poedit-Language: Russian\n"
 
+msgid "Taggit"
+msgstr "Метки"
+
 #: forms.py:20
 msgid "Please provide a comma-separated list of tags."
 msgstr "Укажите метки через запятую."
diff --git a/taggit/managers.py b/taggit/managers.py
index 550e60d..eb4bf44 100644
--- a/taggit/managers.py
+++ b/taggit/managers.py
@@ -288,8 +288,8 @@ class _TaggableManager(models.Manager):
                 else:
                     new_objs.append(obj)
 
-        self.remove(*old_tag_strs)
-        self.add(*new_objs)
+            self.remove(*old_tag_strs)
+            self.add(*new_objs)
 
     @require_instance_manager
     def remove(self, *tags):
diff --git a/tests/tests.py b/tests/tests.py
index fc83b41..ae49d57 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -323,6 +323,53 @@ class TaggableManagerTestCase(BaseTaggingTestCase):
         )
 
     @mock.patch('django.db.models.signals.m2m_changed.send')
+    def test_set_with_clear_true_sends_m2m_changed_signal(self, send_mock):
+        apple = self.food_model.objects.create(name="apple")
+        apple.tags.add('green')
+        apple.tags.add('red')
+        send_mock.reset_mock()
+
+        apple.tags.set('red', clear=True)
+
+        red_pk = self.tag_model.objects.get(name='red').pk
+
+        self.assertEqual(send_mock.call_count, 4)
+        send_mock.assert_has_calls([
+            mock.call(
+                action=u'pre_clear',
+                instance=apple,
+                model=self.tag_model,
+                pk_set=None,
+                reverse=False,
+                sender=self.taggeditem_model,
+                using='default'),
+            mock.call(
+                action=u'post_clear',
+                instance=apple,
+                model=self.tag_model,
+                pk_set=None,
+                reverse=False,
+                sender=self.taggeditem_model,
+                using='default'),
+            mock.call(
+                action=u'pre_add',
+                instance=apple,
+                model=self.tag_model,
+                pk_set=set([red_pk]),
+                reverse=False,
+                sender=self.taggeditem_model,
+                using='default'),
+            mock.call(
+                action=u'post_add',
+                instance=apple,
+                model=self.tag_model,
+                pk_set=set([red_pk]),
+                reverse=False,
+                sender=self.taggeditem_model,
+                using='default')]
+        )
+
+    @mock.patch('django.db.models.signals.m2m_changed.send')
     def test_set_sends_m2m_changed_signal(self, send_mock):
         apple = self.food_model.objects.create(name="apple")
         apple.tags.add('green')

-- 
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