From 7007c5455df448b5df1fd775c6032259037d20ab Mon Sep 17 00:00:00 2001 From: Gio Gottardi Date: Wed, 29 Mar 2017 12:32:13 -0500 Subject: [PATCH 1/5] Add option to search by 'Any Type' and make it the default. --- name/templates/name/_navbar.html | 3 ++- name/templates/name/search.html | 1 + name/utils.py | 9 ++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/name/templates/name/_navbar.html b/name/templates/name/_navbar.html index 7dc79fc..8c2286a 100644 --- a/name/templates/name/_navbar.html +++ b/name/templates/name/_navbar.html @@ -30,12 +30,13 @@ diff --git a/name/templates/name/search.html b/name/templates/name/search.html index 5d7c239..cee2b1c 100644 --- a/name/templates/name/search.html +++ b/name/templates/name/search.html @@ -17,6 +17,7 @@

Search {{ name_app_title }}

{% endif %} {% endfor %} + diff --git a/name/utils.py b/name/utils.py index cdda092..b5b6341 100644 --- a/name/utils.py +++ b/name/utils.py @@ -62,9 +62,12 @@ def resolve_type(q_type): q_type = q_type.split(',') - # Iterate through the Name Types and create a list of Name IDs - # using the corresponding strings values in q_type - return [k for k, v in Name.NAME_TYPE_CHOICES if v in q_type] + if "Any Type" in q_type: + return range(5) + else: + # Iterate through the Name Types and create a list of Name IDs + # using the corresponding strings values in q_type + return [k for k, v in Name.NAME_TYPE_CHOICES if v in q_type] # TODO: Look at reducing the number of queries. From 33007ed48e11f02e4cbf5631c9b1cf0dfb576b93 Mon Sep 17 00:00:00 2001 From: Gio Gottardi Date: Wed, 29 Mar 2017 12:49:24 -0500 Subject: [PATCH 2/5] Update copyright date and contributors list. --- LICENSE | 2 +- README.md | 1 + docs/conf.py | 2 +- docs/index.rst | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 42173ac..8bccf42 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright © 2014, Regents of the University of North Texas +Copyright © 2017, Regents of the University of North Texas All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index aefedfc..30dd921 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Contributors: - [Damon Kelley](https://github.com/damonkelley) - [Lauren Ko](https://github.com/ldko) - [Mark Phillips](https://github.com/vphill) +- [Gio Gottardi](https://github.com/somexpert) ## Developing diff --git a/docs/conf.py b/docs/conf.py index d7ca50d..7191c48 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,7 @@ # General information about the project. project = u'Django Name' -copyright = u'2015, University of North Texas Libraries' +copyright = u'2017, University of North Texas Libraries' author = u'University of North Texas Libraries' # The version info for the project you're documenting, acts as replacement for diff --git a/docs/index.rst b/docs/index.rst index 7b3b7ed..785f2ed 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,9 +30,11 @@ Acknowledgements - `Damon Kelley`_ - `Lauren Ko`_ - `Mark Phillips`_ +- `Gio Gottardi`_ .. _`Joey Liechty`: http://github.com/yeahdef .. _`Damon Kelley`: http://github.com/damonkelley .. _`Lauren Ko`: http://github.com/ldko .. _`Mark Phillips`: http://github.com/vphill +.. _`Gio Gottardi`: http://github.com/somexpert From 3b469dd641584b6159f5f2e42c5b73f0b951e017 Mon Sep 17 00:00:00 2001 From: Gio Gottardi Date: Wed, 29 Mar 2017 12:49:48 -0500 Subject: [PATCH 3/5] Bump version to 1.2.0 --- name/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/name/__init__.py b/name/__init__.py index 493492f..22f0a98 100644 --- a/name/__init__.py +++ b/name/__init__.py @@ -1,2 +1,2 @@ __title__ = 'Django Name' -__version__ = '1.1.0' +__version__ = '1.2.0' From 7a38a64f178a2e443d88993b1ff3937eca5a0b46 Mon Sep 17 00:00:00 2001 From: Gio Gottardi Date: Wed, 29 Mar 2017 13:46:03 -0500 Subject: [PATCH 4/5] Grab NAME_TYPE_CHOICES 'keys' directly from source rather than hardcoding values. --- name/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/name/utils.py b/name/utils.py index b5b6341..bc7322c 100644 --- a/name/utils.py +++ b/name/utils.py @@ -63,7 +63,7 @@ def resolve_type(q_type): q_type = q_type.split(',') if "Any Type" in q_type: - return range(5) + return [k for k, v in Name.NAME_TYPE_CHOICES] else: # Iterate through the Name Types and create a list of Name IDs # using the corresponding strings values in q_type From 55d826e236bbed6d892279cacadda84a234b1ed1 Mon Sep 17 00:00:00 2001 From: Gio Gottardi Date: Wed, 29 Mar 2017 14:54:31 -0500 Subject: [PATCH 5/5] Change version bump to patch bump. --- name/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/name/__init__.py b/name/__init__.py index 22f0a98..5d1cef2 100644 --- a/name/__init__.py +++ b/name/__init__.py @@ -1,2 +1,2 @@ __title__ = 'Django Name' -__version__ = '1.2.0' +__version__ = '1.1.1'