From 01f9156e25fc8a774aa7b980a5097a1e17a62249 Mon Sep 17 00:00:00 2001 From: Alvaro Leonel Date: Sat, 26 May 2018 21:36:09 -0300 Subject: [PATCH] Release version 1.4.0 --- .gitignore | 2 ++ CHANGELOG.rst | 6 +++++- notifications/__init__.py | 2 +- notifications/models.py | 4 ++-- tox.ini | 13 +++++++++++++ 5 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 90b342c..ea90d1b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ MANIFEST htmlcov /.idea/ *.egg-info +.tox/ +.python-version diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5e76e82..eced7e0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,7 +4,11 @@ Changelog 1.4 ---- -WIP +- Adds support for django 2.0.0 (@jphamcsp and @nemesisdesign). +- Adds database index for some fields (@nemesisdesign). +- Changes the ID-based selection to a class-based selection in the methods __live_notify_badge__ and __live_notify_list__ (@AlvaroLQueiroz). +- Now extra data and slug are returned on __live_unread_notification_list__ API (@AlvaroLQueiroz). +- Fix documentation issues (@archatas, @yaoelvon and @AlvaroLQueiroz). 1.3 ----- diff --git a/notifications/__init__.py b/notifications/__init__.py index 2b15430..0ccbb03 100644 --- a/notifications/__init__.py +++ b/notifications/__init__.py @@ -8,6 +8,6 @@ """ # PEP 386-compliant version number: N.N[.N]+[{a|b|c|rc}N[.N]+][.postN][.devN] -__version__ = '1.4.0a' +__version__ = '1.4.0' default_app_config = 'notifications.apps.Config' diff --git a/notifications/models.py b/notifications/models.py index 4f9c227..7d49c50 100644 --- a/notifications/models.py +++ b/notifications/models.py @@ -127,13 +127,13 @@ class NotificationQuerySet(models.query.QuerySet): def mark_as_unsent(self, recipient=None): qs = self.sent() if recipient: - qs = self.filter(recipient=recipient) + qs = qs.filter(recipient=recipient) return qs.update(emailed=False) def mark_as_sent(self, recipient=None): qs = self.unsent() if recipient: - qs = self.filter(recipient=recipient) + qs = qs.filter(recipient=recipient) return qs.update(emailed=True) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..e64214d --- /dev/null +++ b/tox.ini @@ -0,0 +1,13 @@ +# -- FILE: tox.ini +[tox] +envlist = + py{27,34,35,36}-django111 + py{34,35,36}-django200 + +[testenv] +commands = + coverage run --branch --source=notifications manage.py test +deps = + coverage + django111: Django>=1.11,<2.0 + django200: Django>=2.0,<3.0