richie 3.0.1.dev5__py2.py3-none-any.whl → 3.0.1.dev8__py2.py3-none-any.whl
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.
Potentially problematic release.
This version of richie might be problematic. Click here for more details.
- richie/apps/search/__init__.py +0 -17
- richie/apps/search/apps.py +40 -10
- richie/apps/search/filter_definitions/courses.py +1 -1
- richie/apps/search/index_manager.py +1 -1
- richie/apps/search/utils/viewsets.py +1 -1
- richie/apps/search/viewsets/categories.py +1 -1
- richie/apps/search/viewsets/courses.py +1 -1
- richie/apps/search/viewsets/licences.py +1 -1
- richie/apps/search/viewsets/organizations.py +1 -1
- richie/apps/search/viewsets/persons.py +1 -1
- {richie-3.0.1.dev5.dist-info → richie-3.0.1.dev8.dist-info}/METADATA +1 -1
- {richie-3.0.1.dev5.dist-info → richie-3.0.1.dev8.dist-info}/RECORD +16 -16
- {richie-3.0.1.dev5.dist-info → richie-3.0.1.dev8.dist-info}/WHEEL +1 -1
- {richie-3.0.1.dev5.dist-info → richie-3.0.1.dev8.dist-info}/licenses/LICENSE +0 -0
- {richie-3.0.1.dev5.dist-info → richie-3.0.1.dev8.dist-info}/top_level.txt +0 -0
- {richie-3.0.1.dev5.dist-info → richie-3.0.1.dev8.dist-info}/zip-safe +0 -0
richie/apps/search/__init__.py
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"""Define SearchConfig as the default app configuration."""
|
|
2
|
-
|
|
3
|
-
from django.conf import settings
|
|
4
|
-
|
|
5
|
-
from .elasticsearch import (
|
|
6
|
-
ElasticsearchClientCompat7to6,
|
|
7
|
-
ElasticsearchIndicesClientCompat7to6,
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
# pylint: disable=invalid-name
|
|
11
|
-
default_app_config = "richie.apps.search.apps.SearchConfig"
|
|
12
|
-
|
|
13
|
-
ES_CLIENT = ElasticsearchClientCompat7to6(
|
|
14
|
-
getattr(settings, "RICHIE_ES_HOST", ["elasticsearch"])
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
ES_INDICES_CLIENT = ElasticsearchIndicesClientCompat7to6(ES_CLIENT)
|
richie/apps/search/apps.py
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
"""Signals to update the Elasticsearch indices when page modifications are published."""
|
|
2
2
|
|
|
3
|
+
# Define the global ES_CLIENT and ES_INDICES_CLIENT variables
|
|
4
|
+
|
|
3
5
|
from django.apps import AppConfig
|
|
6
|
+
from django.conf import settings
|
|
7
|
+
|
|
8
|
+
from .elasticsearch import (
|
|
9
|
+
ElasticsearchClientCompat7to6,
|
|
10
|
+
ElasticsearchIndicesClientCompat7to6,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
ES_CLIENT = None
|
|
14
|
+
ES_INDICES_CLIENT = None
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def init_es():
|
|
18
|
+
"""
|
|
19
|
+
Initialize the Elasticsearch client and indices client.
|
|
20
|
+
"""
|
|
21
|
+
global ES_CLIENT # pylint: disable=global-statement
|
|
22
|
+
ES_CLIENT = ElasticsearchClientCompat7to6(
|
|
23
|
+
getattr(settings, "RICHIE_ES_HOST", ["elasticsearch"]),
|
|
24
|
+
**getattr(settings, "RICHIE_ES_CLIENT_KWARGS", {}),
|
|
25
|
+
)
|
|
26
|
+
global ES_INDICES_CLIENT # pylint: disable=global-statement
|
|
27
|
+
ES_INDICES_CLIENT = ElasticsearchIndicesClientCompat7to6(ES_CLIENT)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# pylint: disable=import-outside-toplevel,cyclic-import
|
|
31
|
+
def init_signals():
|
|
32
|
+
"""Register signals to update the Elasticsearch indices."""
|
|
33
|
+
from cms.signals import post_publish, post_unpublish
|
|
34
|
+
|
|
35
|
+
from .signals import on_page_published, on_page_unpublished
|
|
36
|
+
|
|
37
|
+
post_publish.connect(on_page_published, dispatch_uid="search_post_publish")
|
|
38
|
+
post_unpublish.connect(on_page_unpublished, dispatch_uid="search_post_unpublish")
|
|
4
39
|
|
|
5
40
|
|
|
6
41
|
class SearchConfig(AppConfig):
|
|
@@ -9,14 +44,9 @@ class SearchConfig(AppConfig):
|
|
|
9
44
|
name = "richie.apps.search"
|
|
10
45
|
verbose_name = "Richie search app"
|
|
11
46
|
|
|
12
|
-
# pylint: disable=import-outside-toplevel
|
|
13
47
|
def ready(self):
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
post_publish.connect(on_page_published, dispatch_uid="search_post_publish")
|
|
20
|
-
post_unpublish.connect(
|
|
21
|
-
on_page_unpublished, dispatch_uid="search_post_unpublish"
|
|
22
|
-
)
|
|
48
|
+
"""
|
|
49
|
+
Initialize the Elasticsearch client and register signals.
|
|
50
|
+
"""
|
|
51
|
+
init_es()
|
|
52
|
+
init_signals()
|
|
@@ -15,7 +15,7 @@ from cms.api import Page
|
|
|
15
15
|
|
|
16
16
|
from richie.apps.core.defaults import ALL_LANGUAGES_DICT
|
|
17
17
|
|
|
18
|
-
from .. import ES_CLIENT
|
|
18
|
+
from ..apps import ES_CLIENT
|
|
19
19
|
from ..fields.array import ArrayField
|
|
20
20
|
from ..indexers import ES_INDICES
|
|
21
21
|
from ..utils.i18n import get_best_field_language
|
|
@@ -10,7 +10,7 @@ from django.utils import timezone
|
|
|
10
10
|
|
|
11
11
|
from elasticsearch.exceptions import NotFoundError, RequestError
|
|
12
12
|
|
|
13
|
-
from . import ES_CLIENT, ES_INDICES_CLIENT
|
|
13
|
+
from .apps import ES_CLIENT, ES_INDICES_CLIENT
|
|
14
14
|
from .defaults import ES_CHUNK_SIZE, ES_INDICES_PREFIX
|
|
15
15
|
from .elasticsearch import bulk_compat
|
|
16
16
|
from .indexers import ES_INDICES
|
|
@@ -11,7 +11,7 @@ from rest_framework.exceptions import NotFound
|
|
|
11
11
|
from rest_framework.response import Response
|
|
12
12
|
from rest_framework.viewsets import ViewSet
|
|
13
13
|
|
|
14
|
-
from .. import ES_CLIENT
|
|
14
|
+
from ..apps import ES_CLIENT
|
|
15
15
|
from ..defaults import ES_PAGE_SIZE
|
|
16
16
|
from ..indexers import ES_INDICES
|
|
17
17
|
from ..utils.viewsets import ViewSetMetadata
|
|
@@ -8,7 +8,7 @@ from elasticsearch.exceptions import NotFoundError
|
|
|
8
8
|
from rest_framework.response import Response
|
|
9
9
|
from rest_framework.viewsets import ViewSet
|
|
10
10
|
|
|
11
|
-
from .. import ES_CLIENT
|
|
11
|
+
from ..apps import ES_CLIENT
|
|
12
12
|
from ..defaults import ES_PAGE_SIZE, FILTERS_PRESENTATION
|
|
13
13
|
from ..filter_definitions import FILTERS
|
|
14
14
|
from ..indexers import ES_INDICES
|
|
@@ -9,7 +9,7 @@ from elasticsearch.exceptions import NotFoundError
|
|
|
9
9
|
from rest_framework.response import Response
|
|
10
10
|
from rest_framework.viewsets import ViewSet
|
|
11
11
|
|
|
12
|
-
from .. import ES_CLIENT
|
|
12
|
+
from ..apps import ES_CLIENT
|
|
13
13
|
from ..defaults import ES_PAGE_SIZE
|
|
14
14
|
from ..indexers import ES_INDICES
|
|
15
15
|
from ..utils.viewsets import AutocompleteMixin, ViewSetMetadata
|
|
@@ -9,7 +9,7 @@ from elasticsearch.exceptions import NotFoundError
|
|
|
9
9
|
from rest_framework.response import Response
|
|
10
10
|
from rest_framework.viewsets import ViewSet
|
|
11
11
|
|
|
12
|
-
from .. import ES_CLIENT
|
|
12
|
+
from ..apps import ES_CLIENT
|
|
13
13
|
from ..defaults import ES_PAGE_SIZE
|
|
14
14
|
from ..indexers import ES_INDICES
|
|
15
15
|
from ..utils.viewsets import AutocompleteMixin, ViewSetMetadata
|
|
@@ -9,7 +9,7 @@ from elasticsearch.exceptions import NotFoundError
|
|
|
9
9
|
from rest_framework.response import Response
|
|
10
10
|
from rest_framework.viewsets import ViewSet
|
|
11
11
|
|
|
12
|
-
from .. import ES_CLIENT
|
|
12
|
+
from ..apps import ES_CLIENT
|
|
13
13
|
from ..defaults import ES_PAGE_SIZE
|
|
14
14
|
from ..indexers import ES_INDICES
|
|
15
15
|
from ..utils.viewsets import AutocompleteMixin, ViewSetMetadata
|
|
@@ -1111,15 +1111,15 @@ richie/apps/demo/fixtures/portrait/portrait-8.png,sha256=BvA5je_9wioCgz56GxRIWX9
|
|
|
1111
1111
|
richie/apps/demo/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1112
1112
|
richie/apps/demo/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1113
1113
|
richie/apps/demo/management/commands/create_demo_site.py,sha256=8GdmyHymtPVkN86zmvJ00Lx52F9P1wNNGOIQA_jEJY4,31642
|
|
1114
|
-
richie/apps/search/__init__.py,sha256=
|
|
1115
|
-
richie/apps/search/apps.py,sha256=
|
|
1114
|
+
richie/apps/search/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1115
|
+
richie/apps/search/apps.py,sha256=npt71JLONMn4-BY5pJm8IAlAKZhKqzYC8sCOaCV9phY,1575
|
|
1116
1116
|
richie/apps/search/cms_toolbars.py,sha256=z7n3QDSPIQks2NvmGRBWd58cbJq0lqEsBJmhK9eTKns,1272
|
|
1117
1117
|
richie/apps/search/defaults.py,sha256=AvYbKIBXd9z9KeUloEr3Y5DJ1lxch82DmxrG31ncNGo,6004
|
|
1118
1118
|
richie/apps/search/description.apib,sha256=UPTZaDWUV_U29qLFjHRWumEFPwH97eUbYideboNnot4,9503
|
|
1119
1119
|
richie/apps/search/elasticsearch.py,sha256=mE20jsQzLnp1VIQ2zntu_UYluECSkmjI2vAEgF60xCA,3811
|
|
1120
1120
|
richie/apps/search/exceptions.py,sha256=Ld3tYIYJhigNvA_dymZRMQQTYvQmxRTIPbfu37s5K-4,479
|
|
1121
1121
|
richie/apps/search/forms.py,sha256=4niV0PUZmhz6GwRdN6JT41nRNa4NsNKbgkhZTrT1Fho,15377
|
|
1122
|
-
richie/apps/search/index_manager.py,sha256=
|
|
1122
|
+
richie/apps/search/index_manager.py,sha256=lSggqzm9qZaujKMTqsWbAchmCkcAHsiZhrlRBMKSseM,6328
|
|
1123
1123
|
richie/apps/search/models.py,sha256=xJZX2xiPjJlIRwy0eiBFMzBULWnUMgdPTTY3zOzQ0I0,371
|
|
1124
1124
|
richie/apps/search/signals.py,sha256=waq5ju9F-sdc5_X1YqRpaa78Na7yJK8xt38qEweb9PM,7143
|
|
1125
1125
|
richie/apps/search/text_indexing.py,sha256=0jFAb1fGJCnUKptW8SYTeS2AdPkEZOmi0Bud3lcHMLc,5647
|
|
@@ -1130,7 +1130,7 @@ richie/apps/search/fields/array.py,sha256=Ukfg-viKEZdk3NunS0lqCI2XDMs1lthsK78irS
|
|
|
1130
1130
|
richie/apps/search/fields/datetimerange.py,sha256=Fj02Y4B0DVC4amHNaEa9cV7r5hhS0Qb5uQvOOU1NEEA,2500
|
|
1131
1131
|
richie/apps/search/filter_definitions/__init__.py,sha256=HSRB17H9Y76Y7QpqBuxJZ5a06slxZz-J4h2_KHGY51k,627
|
|
1132
1132
|
richie/apps/search/filter_definitions/base.py,sha256=YUk8nucv5Ceuvos5mepsyoKZaSrhHfgTwtnUI5x8evE,23513
|
|
1133
|
-
richie/apps/search/filter_definitions/courses.py,sha256=
|
|
1133
|
+
richie/apps/search/filter_definitions/courses.py,sha256=RiQRChczwqROdk8CFVS6ENliUoWwpsuXSmBcpoq6pCc,20321
|
|
1134
1134
|
richie/apps/search/filter_definitions/helpers.py,sha256=Buyf0EJzYnlM3S8QrPWPhgRhKVL1098g_2J7aHhMYB0,838
|
|
1135
1135
|
richie/apps/search/filter_definitions/mixins.py,sha256=EEcYVu426reDfeCaeVzNEzj7z40KjPB_yz3FthAIN-c,5669
|
|
1136
1136
|
richie/apps/search/indexers/__init__.py,sha256=RcrvJGdyUBxcuWY9OnZ2G-G0YEcDb55n3_otj2JqWWg,655
|
|
@@ -1146,13 +1146,13 @@ richie/apps/search/templates/search/search.html,sha256=9F8RlGnVGYJh9lIlhlCBMKs44
|
|
|
1146
1146
|
richie/apps/search/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1147
1147
|
richie/apps/search/utils/i18n.py,sha256=dHIQ362xGFZUOYP8QtjKhP8xIDYTHfDKUHlb8TmRBP8,695
|
|
1148
1148
|
richie/apps/search/utils/indexers.py,sha256=WCuB1-9GfkRoVaubopKIZDpyH0rW2bpHEZB4eo1_fFU,3107
|
|
1149
|
-
richie/apps/search/utils/viewsets.py,sha256
|
|
1149
|
+
richie/apps/search/utils/viewsets.py,sha256=-khOPIXhjAXCODut31-SnVIsor0lNU5_Sg36dYbhE3Q,2911
|
|
1150
1150
|
richie/apps/search/viewsets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1151
|
-
richie/apps/search/viewsets/categories.py,sha256=
|
|
1152
|
-
richie/apps/search/viewsets/courses.py,sha256=
|
|
1153
|
-
richie/apps/search/viewsets/licences.py,sha256=
|
|
1154
|
-
richie/apps/search/viewsets/organizations.py,sha256=
|
|
1155
|
-
richie/apps/search/viewsets/persons.py,sha256=
|
|
1151
|
+
richie/apps/search/viewsets/categories.py,sha256=zT8NOwmJB3MY33CrOBvvTrtf1LScLjBKmH_DGOQznpQ,5860
|
|
1152
|
+
richie/apps/search/viewsets/courses.py,sha256=1lXueD3jTCAh46JY8jyq9VbnfncuRdLud8Jk7Lz0Bmc,4432
|
|
1153
|
+
richie/apps/search/viewsets/licences.py,sha256=BFoESlgMrl0tR04t_hq1i0d-J0lsLbsplTDypz5EELc,3539
|
|
1154
|
+
richie/apps/search/viewsets/organizations.py,sha256=zfzY6GCFuRG0T7EiU5-Ie7Jl2PgMgo4IzWIURnnAV74,3640
|
|
1155
|
+
richie/apps/search/viewsets/persons.py,sha256=ryfRq4ij6RpfVHSWybyVji9pa7sRAhEbBEz9Y79oGWU,3586
|
|
1156
1156
|
richie/locale/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1157
1157
|
richie/locale/ar_SA/LC_MESSAGES/django.mo,sha256=n0aFUigovI5AoGVyfs0b2flRA2b_thaZQa0ltKCGXJs,8630
|
|
1158
1158
|
richie/locale/ar_SA/LC_MESSAGES/django.po,sha256=Equ47JtCDrwW2UVgyqERu8KJR4M2bhSJcFpeavNAIp4,57547
|
|
@@ -2483,9 +2483,9 @@ richie/static/richie/js/build/99870.aaea7dc8ccbfbbde731b.index.js,sha256=cpTLUxk
|
|
|
2483
2483
|
richie/static/richie/js/build/99895.aaea7dc8ccbfbbde731b.index.js,sha256=ulau6gBdM9fUp02EkaqHqLq74-JKi17lbC5oxfJsgqc,2570
|
|
2484
2484
|
richie/static/richie/js/build/99953.aaea7dc8ccbfbbde731b.index.js,sha256=OWoLPJnHrmvF3HBQPgXooAGo5E0yJpJ7QTFHFghJpI8,135
|
|
2485
2485
|
richie/static/richie/js/build/index.js,sha256=4aDGpVam3g1Cluu5vY74Rtk2d6kftkP7CZgSiq8jmMw,1332827
|
|
2486
|
-
richie-3.0.1.
|
|
2487
|
-
richie-3.0.1.
|
|
2488
|
-
richie-3.0.1.
|
|
2489
|
-
richie-3.0.1.
|
|
2490
|
-
richie-3.0.1.
|
|
2491
|
-
richie-3.0.1.
|
|
2486
|
+
richie-3.0.1.dev8.dist-info/licenses/LICENSE,sha256=5LKjFIE1kpKzBfR2iwq_RGHhHM5XawdlfZrcHTsCLpA,1079
|
|
2487
|
+
richie-3.0.1.dev8.dist-info/METADATA,sha256=PAvMlQSvb4YpoW2cJuWP3f8pP0jmboYt0_FYWXZCSiI,7030
|
|
2488
|
+
richie-3.0.1.dev8.dist-info/WHEEL,sha256=7mLNlhqgufj7fxENZhtzRraBDfDi3AITas5GqZGp0zk,109
|
|
2489
|
+
richie-3.0.1.dev8.dist-info/top_level.txt,sha256=WJvFAAHtUQ5T5MOuG6jRynDJG9kVfl4jtuf1qxIXND8,16
|
|
2490
|
+
richie-3.0.1.dev8.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
2491
|
+
richie-3.0.1.dev8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|