From 4a385bde6b10d1f11ea5955623b7df2b44fc1baf Mon Sep 17 00:00:00 2001 From: Scot Hacker Date: Thu, 11 Apr 2019 23:51:38 -0700 Subject: [PATCH] Bump version to 2.4.6 --- README.md | 2 ++ todo/__init__.py | 2 +- todo/defaults.py | 10 ++++------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c4b6a6d..3f89792 100644 --- a/README.md +++ b/README.md @@ -300,6 +300,8 @@ django-todo uses pytest exclusively for testing. The best way to run the suite i ## Version History +**2.4.6** Use `defaults` hash for default settings, update perms and tests + **2.4.5** Re-enable "notify" feature during task edit **2.4.4** Fix issues with setup.py / installation diff --git a/todo/__init__.py b/todo/__init__.py index 1520ae1..c3d3df8 100644 --- a/todo/__init__.py +++ b/todo/__init__.py @@ -1,7 +1,7 @@ """ A multi-user, multi-group task management and assignment system for Django. """ -__version__ = '2.4.5' +__version__ = '2.4.6' __author__ = 'Scot Hacker' __email__ = 'shacker@birdhouse.org' diff --git a/todo/defaults.py b/todo/defaults.py index 1283e07..bc1a385 100644 --- a/todo/defaults.py +++ b/todo/defaults.py @@ -1,15 +1,14 @@ # If a documented django-todo option is NOT configured in settings, use these values. from django.conf import settings - hash = { "TODO_ALLOW_FILE_ATTACHMENTS": True, + "TODO_COMMENT_CLASSES": [], + "TODO_DEFAULT_ASSIGNEE": None, "TODO_LIMIT_FILE_ATTACHMENTS": [".jpg", ".gif", ".png", ".csv", ".pdf", ".zip"], "TODO_MAXIMUM_ATTACHMENT_SIZE": 5000000, - "TODO_STAFF_ONLY": True, - "TODO_DEFAULT_ASSIGNEE": None, "TODO_PUBLIC_SUBMIT_REDIRECT": "/", - "TODO_COMMENT_CLASSES": [], + "TODO_STAFF_ONLY": True, } # These intentionally have no defaults (user MUST set a value): @@ -22,5 +21,4 @@ def defaults(key: str): """Try to get a setting from project settings. If empty or doesn't exist, fall back to a value from defaults hash.""" - _ret = getattr(settings, key, False) or hash.get(key) - return _ret + return getattr(settings, key, False) or hash.get(key)