drf-haystack 1.8.13__tar.gz → 1.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {drf-haystack-1.8.13/drf_haystack.egg-info → drf_haystack-1.9}/PKG-INFO +4 -4
- {drf-haystack-1.8.13 → drf_haystack-1.9}/Pipfile +3 -3
- {drf-haystack-1.8.13 → drf_haystack-1.9}/README.md +3 -3
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/07_faceting.rst +3 -3
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/index.rst +15 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack/__init__.py +1 -1
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack/query.py +2 -2
- {drf-haystack-1.8.13 → drf_haystack-1.9/drf_haystack.egg-info}/PKG-INFO +4 -4
- drf_haystack-1.9/drf_haystack.egg-info/requires.txt +4 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/setup.py +8 -9
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/test_serializers.py +2 -2
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/urls.py +2 -2
- drf-haystack-1.8.13/drf_haystack.egg-info/requires.txt +0 -4
- {drf-haystack-1.8.13 → drf_haystack-1.9}/LICENSE.txt +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/MANIFEST.in +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/01_intro.rst +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/02_autocomplete.rst +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/03_geospatial.rst +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/04_highlighting.rst +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/05_more_like_this.rst +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/06_term_boost.rst +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/08_permissions.rst +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/09_multiple_indexes.rst +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/10_tips_n_tricks.rst +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/Makefile +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/apidoc/drf_haystack.rst +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/apidoc/modules.rst +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/conf.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/docs/make.bat +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack/constants.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack/fields.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack/filters.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack/generics.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack/mixins.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack/serializers.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack/utils.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack/viewsets.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack.egg-info/SOURCES.txt +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack.egg-info/dependency_links.txt +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack.egg-info/not-zip-safe +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/drf_haystack.egg-info/top_level.txt +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/setup.cfg +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/__init__.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/apps.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/constants.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mixins.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/__init__.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/admin.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/fixtures/mockallfield.json +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/fixtures/mocklocation.json +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/fixtures/mockperson.json +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/fixtures/mockpet.json +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/migrations/0001_initial.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/migrations/0002_mockperson.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/migrations/0003_mockpet.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/migrations/0004_load_fixtures.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/migrations/0005_mockperson_birthdate.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/migrations/0006_mockallfield.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/migrations/__init__.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/models.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/search_indexes.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/serializers.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/templates/search/indexes/mockapp/mocklocation_text.txt +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/templates/search/indexes/mockapp/mockperson_text.txt +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/templates/search/indexes/mockapp/mockpet_text.txt +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/views.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/run_tests.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/settings.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/test_filters.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/test_utils.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/test_viewsets.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tests/wsgi.py +0 -0
- {drf-haystack-1.8.13 → drf_haystack-1.9}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: drf-haystack
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9
|
|
4
4
|
Summary: Makes Haystack play nice with Django REST Framework
|
|
5
5
|
Home-page: https://github.com/rhblind/drf-haystack
|
|
6
6
|
Download-URL: https://github.com/rhblind/drf-haystack.git
|
|
@@ -17,9 +17,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
17
17
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
18
|
Requires-Python: >=3.7
|
|
19
19
|
License-File: LICENSE.txt
|
|
20
|
-
Requires-Dist: Django<
|
|
21
|
-
Requires-Dist: djangorestframework
|
|
22
|
-
Requires-Dist: django-haystack
|
|
20
|
+
Requires-Dist: Django<5.2,>=2.2
|
|
21
|
+
Requires-Dist: djangorestframework<3.16,>=3.12
|
|
22
|
+
Requires-Dist: django-haystack<3.4,>=2.8
|
|
23
23
|
Requires-Dist: python-dateutil
|
|
24
24
|
|
|
25
25
|
Implements a ViewSet, FiltersBackends and Serializers in order to play nice with Haystack.
|
|
@@ -4,9 +4,9 @@ verify_ssl = true
|
|
|
4
4
|
name = "pypi"
|
|
5
5
|
|
|
6
6
|
[packages]
|
|
7
|
-
django = ">=2.2
|
|
8
|
-
django-haystack = ">=2.8
|
|
9
|
-
djangorestframework = ">=3.
|
|
7
|
+
django = ">=2.2,<5.2"
|
|
8
|
+
django-haystack = ">=2.8,<3.4"
|
|
9
|
+
djangorestframework = ">=3.12.0,<3.16"
|
|
10
10
|
python-dateutil = "*"
|
|
11
11
|
|
|
12
12
|
[dev-packages]
|
|
@@ -20,9 +20,9 @@ Supported versions
|
|
|
20
20
|
------------------
|
|
21
21
|
|
|
22
22
|
- Python 3.7 and above
|
|
23
|
-
- Django >=2.2,<
|
|
24
|
-
- Haystack 2.8
|
|
25
|
-
- Django REST Framework >=3.
|
|
23
|
+
- Django >=2.2,<5.2
|
|
24
|
+
- Haystack >=2.8,<3.4
|
|
25
|
+
- Django REST Framework >=3.12.0,<3.16
|
|
26
26
|
- elasticsearch >=2.0.0,<=8.3.3,
|
|
27
27
|
|
|
28
28
|
|
|
@@ -218,7 +218,7 @@ Any view that inherits the :class:`drf_haystack.mixins.FacetMixin` will have a s
|
|
|
218
218
|
class has a couple of hooks for dealing with faceting, namely:
|
|
219
219
|
|
|
220
220
|
- :attr:`drf_haystack.mixins.FacetMixin.facet_filter_backends` - A list of filter backends that will be used to
|
|
221
|
-
apply faceting to the queryset. Defaults to :class
|
|
221
|
+
apply faceting to the queryset. Defaults to :class:`drf_haystack.filters.HaystackFacetFilter`, which should be
|
|
222
222
|
sufficient in most cases.
|
|
223
223
|
- :attr:`drf_haystack.mixins.FacetMixin.facet_serializer_class` - The :class:`drf_haystack.serializers.HaystackFacetSerializer`
|
|
224
224
|
instance that will be used for serializing the result.
|
|
@@ -241,8 +241,8 @@ Any view that inherits the :class:`drf_haystack.mixins.FacetMixin` will have a s
|
|
|
241
241
|
In order to set up a view which can respond to regular queries under ie ``^search/$`` and faceted queries under
|
|
242
242
|
``^search/facets/$``, we could do something like this.
|
|
243
243
|
|
|
244
|
-
We can also change the query param text from ``selected_facets`` to our own choice like ``params`` or ``p``. For this
|
|
245
|
-
to make happen please provide ``facet_query_params_text`` attribute as shown in the example.
|
|
244
|
+
We can also change the query param text from ``selected_facets`` to our own choice like ``params`` or ``p``. For this
|
|
245
|
+
to make happen please provide ``facet_query_params_text`` attribute as shown in the example.
|
|
246
246
|
|
|
247
247
|
.. code-block:: python
|
|
248
248
|
|
|
@@ -105,6 +105,21 @@ Thanks guys!
|
|
|
105
105
|
Changelog
|
|
106
106
|
=========
|
|
107
107
|
|
|
108
|
+
v1.9
|
|
109
|
+
------
|
|
110
|
+
*Release date: 2023-10-04*
|
|
111
|
+
|
|
112
|
+
- Return an empty query object instead of an empty list when no filter is passed (:drf-issue:`202`).
|
|
113
|
+
- add "id" as an optional value of the serializer fields returning the haystack internal id (:drf-issue:`193`).
|
|
114
|
+
- Update supported versions of main dependencies (Django >=2.2,<5.2; djangorestframework >=3.12.0,<3.16; django-haystack >=2.8,<3.4).
|
|
115
|
+
|
|
116
|
+
v1.8.13
|
|
117
|
+
------
|
|
118
|
+
*Release date: 2023-10-04*
|
|
119
|
+
|
|
120
|
+
- Support patch versions of Django 4.2.x.
|
|
121
|
+
- Upgrade a few dependencies.
|
|
122
|
+
|
|
108
123
|
v1.8.12
|
|
109
124
|
------
|
|
110
125
|
*Release date: 2023-01-03*
|
|
@@ -155,10 +155,10 @@ class FilterQueryBuilder(BaseQueryBuilder):
|
|
|
155
155
|
applicable_filters.append(term)
|
|
156
156
|
|
|
157
157
|
applicable_filters = six.moves.reduce(
|
|
158
|
-
self.default_operator, filter(lambda x: x, applicable_filters)) if applicable_filters else
|
|
158
|
+
self.default_operator, filter(lambda x: x, applicable_filters)) if applicable_filters else self.view.query_object()
|
|
159
159
|
|
|
160
160
|
applicable_exclusions = six.moves.reduce(
|
|
161
|
-
self.default_operator, filter(lambda x: x, applicable_exclusions)) if applicable_exclusions else
|
|
161
|
+
self.default_operator, filter(lambda x: x, applicable_exclusions)) if applicable_exclusions else self.view.query_object()
|
|
162
162
|
|
|
163
163
|
return applicable_filters, applicable_exclusions
|
|
164
164
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: drf-haystack
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9
|
|
4
4
|
Summary: Makes Haystack play nice with Django REST Framework
|
|
5
5
|
Home-page: https://github.com/rhblind/drf-haystack
|
|
6
6
|
Download-URL: https://github.com/rhblind/drf-haystack.git
|
|
@@ -17,9 +17,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
17
17
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
18
|
Requires-Python: >=3.7
|
|
19
19
|
License-File: LICENSE.txt
|
|
20
|
-
Requires-Dist: Django<
|
|
21
|
-
Requires-Dist: djangorestframework
|
|
22
|
-
Requires-Dist: django-haystack
|
|
20
|
+
Requires-Dist: Django<5.2,>=2.2
|
|
21
|
+
Requires-Dist: djangorestframework<3.16,>=3.12
|
|
22
|
+
Requires-Dist: django-haystack<3.4,>=2.8
|
|
23
23
|
Requires-Dist: python-dateutil
|
|
24
24
|
|
|
25
25
|
Implements a ViewSet, FiltersBackends and Serializers in order to play nice with Haystack.
|
|
@@ -7,6 +7,7 @@ try:
|
|
|
7
7
|
from setuptools import setup
|
|
8
8
|
except ImportError:
|
|
9
9
|
from ez_setup import use_setuptools
|
|
10
|
+
|
|
10
11
|
use_setuptools()
|
|
11
12
|
from setuptools import setup
|
|
12
13
|
|
|
@@ -18,6 +19,7 @@ def get_version(package):
|
|
|
18
19
|
init_py = open(os.path.join(package, "__init__.py")).read()
|
|
19
20
|
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
|
|
20
21
|
|
|
22
|
+
|
|
21
23
|
setup(
|
|
22
24
|
name="drf-haystack",
|
|
23
25
|
version=get_version("drf_haystack"),
|
|
@@ -33,15 +35,12 @@ setup(
|
|
|
33
35
|
],
|
|
34
36
|
include_package_data=True,
|
|
35
37
|
install_requires=[
|
|
36
|
-
"Django>=2.2,<
|
|
37
|
-
"djangorestframework>=3.
|
|
38
|
-
"django-haystack>=2.8
|
|
39
|
-
"python-dateutil"
|
|
40
|
-
],
|
|
41
|
-
tests_require=[
|
|
42
|
-
"nose",
|
|
43
|
-
"coverage"
|
|
38
|
+
"Django>=2.2,<5.2",
|
|
39
|
+
"djangorestframework>=3.12,<3.16",
|
|
40
|
+
"django-haystack>=2.8,<3.4",
|
|
41
|
+
"python-dateutil",
|
|
44
42
|
],
|
|
43
|
+
tests_require=["nose", "coverage"],
|
|
45
44
|
zip_safe=False,
|
|
46
45
|
test_suite="tests.run_tests.start",
|
|
47
46
|
classifiers=[
|
|
@@ -54,5 +53,5 @@ setup(
|
|
|
54
53
|
"Programming Language :: Python :: 3",
|
|
55
54
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
56
55
|
],
|
|
57
|
-
python_requires=">=3.7"
|
|
56
|
+
python_requires=">=3.7",
|
|
58
57
|
)
|
|
@@ -9,7 +9,7 @@ import json
|
|
|
9
9
|
from datetime import datetime, timedelta
|
|
10
10
|
|
|
11
11
|
import six
|
|
12
|
-
from django.
|
|
12
|
+
from django.urls import path, include
|
|
13
13
|
from django.core.exceptions import ImproperlyConfigured
|
|
14
14
|
from django.http import QueryDict
|
|
15
15
|
from django.test import TestCase, SimpleTestCase, override_settings
|
|
@@ -90,7 +90,7 @@ router.register("search-person-mlt", viewset=SearchPersonMLTViewSet, basename="s
|
|
|
90
90
|
router.register("search-person-facet", viewset=SearchPersonFacetViewSet, basename="search-person-facet")
|
|
91
91
|
|
|
92
92
|
urlpatterns = [
|
|
93
|
-
|
|
93
|
+
path(r"^", include(router.urls))
|
|
94
94
|
]
|
|
95
95
|
|
|
96
96
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
|
|
3
|
-
from django.
|
|
3
|
+
from django.urls import include, path
|
|
4
4
|
|
|
5
5
|
from rest_framework import routers
|
|
6
6
|
|
|
@@ -11,5 +11,5 @@ router.register("search-person-facet", viewset=SearchPersonFacetViewSet, basenam
|
|
|
11
11
|
router.register("search-person-mlt", viewset=SearchPersonMLTViewSet, basename="search-person-mlt")
|
|
12
12
|
|
|
13
13
|
urlpatterns = [
|
|
14
|
-
|
|
14
|
+
path(r"^", include(router.urls))
|
|
15
15
|
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{drf-haystack-1.8.13 → drf_haystack-1.9}/tests/mockapp/migrations/0005_mockperson_birthdate.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|