simplesitesearch 0.0.3__tar.gz → 0.0.5__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.
- {simplesitesearch-0.0.3/simplesitesearch.egg-info → simplesitesearch-0.0.5}/PKG-INFO +7 -1
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/README.md +6 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/pyproject.toml +1 -1
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/setup.cfg +1 -1
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/setup.py +1 -1
- simplesitesearch-0.0.5/simplesitesearch/__init__.py +1 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch/utils.py +9 -3
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5/simplesitesearch.egg-info}/PKG-INFO +7 -1
- simplesitesearch-0.0.3/simplesitesearch/__init__.py +0 -1
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/LICENSE +0 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/MANIFEST.in +0 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch/cms_apps.py +0 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch/templates/simplesitesearch/pagination.html +0 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch/templates/simplesitesearch/search_results.html +0 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch/urls.py +0 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch/views.py +0 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch.egg-info/SOURCES.txt +0 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch.egg-info/dependency_links.txt +0 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch.egg-info/not-zip-safe +0 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch.egg-info/requires.txt +0 -0
- {simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: simplesitesearch
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.5
|
|
4
4
|
Summary: Reptile Simple Site Search django app
|
|
5
5
|
Home-page: https://github.com/FlavienLouis/simplesitesearch
|
|
6
6
|
Author: Reptile Tech
|
|
@@ -285,6 +285,12 @@ For support and questions, please open an issue on the [GitHub repository](https
|
|
|
285
285
|
|
|
286
286
|
## Changelog
|
|
287
287
|
|
|
288
|
+
### 0.0.5
|
|
289
|
+
- **Fixed** tag parsing: single tag string (e.g. `Hometag`) no longer sent as `H,o,m,e,t,a,g`; string is treated as one tag. API URL keeps commas unencoded so multiple tags parse correctly.
|
|
290
|
+
|
|
291
|
+
### 0.0.4
|
|
292
|
+
- SSL verification configurable via `SITE_SEARCH_VERIFY_SSL` (default `True`).
|
|
293
|
+
|
|
288
294
|
### 0.0.3
|
|
289
295
|
- Added `simplesitesearch.utils` QOL helpers: `get_search_results`, `get_search_api_url`, `build_search_query_string`, `parse_comma_separated_tags`, `normalize_search_term`, `safe_int`
|
|
290
296
|
- Tag filter: `tag` (or `tags`) query parameter forwarded to API as comma-separated `tags`; pagination links preserve tags
|
|
@@ -239,6 +239,12 @@ For support and questions, please open an issue on the [GitHub repository](https
|
|
|
239
239
|
|
|
240
240
|
## Changelog
|
|
241
241
|
|
|
242
|
+
### 0.0.5
|
|
243
|
+
- **Fixed** tag parsing: single tag string (e.g. `Hometag`) no longer sent as `H,o,m,e,t,a,g`; string is treated as one tag. API URL keeps commas unencoded so multiple tags parse correctly.
|
|
244
|
+
|
|
245
|
+
### 0.0.4
|
|
246
|
+
- SSL verification configurable via `SITE_SEARCH_VERIFY_SSL` (default `True`).
|
|
247
|
+
|
|
242
248
|
### 0.0.3
|
|
243
249
|
- Added `simplesitesearch.utils` QOL helpers: `get_search_results`, `get_search_api_url`, `build_search_query_string`, `parse_comma_separated_tags`, `normalize_search_term`, `safe_int`
|
|
244
250
|
- Tag filter: `tag` (or `tags`) query parameter forwarded to API as comma-separated `tags`; pagination links preserve tags
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.5"
|
|
@@ -35,11 +35,16 @@ def tags_to_query_value(tags):
|
|
|
35
35
|
Convert a list of tags to a comma-separated string for query params or API.
|
|
36
36
|
|
|
37
37
|
Args:
|
|
38
|
-
tags: Iterable of tag strings.
|
|
38
|
+
tags: Iterable of tag strings, or a single tag string (e.g. "Hometag").
|
|
39
|
+
A string is treated as one tag, not iterated by character.
|
|
39
40
|
|
|
40
41
|
Returns:
|
|
41
42
|
Comma-separated string, or None if tags is empty.
|
|
42
43
|
"""
|
|
44
|
+
if not tags:
|
|
45
|
+
return None
|
|
46
|
+
if isinstance(tags, str):
|
|
47
|
+
tags = [tags.strip()] if tags.strip() else []
|
|
43
48
|
if not tags:
|
|
44
49
|
return None
|
|
45
50
|
return ",".join(str(t).strip() for t in tags if str(t).strip())
|
|
@@ -128,7 +133,8 @@ def get_search_api_url(term, current_page, tags=None):
|
|
|
128
133
|
)
|
|
129
134
|
tag_value = tags_to_query_value(tags)
|
|
130
135
|
if tag_value:
|
|
131
|
-
|
|
136
|
+
# Keep commas unencoded so the API can split tags (e.g. tags=Home,tag)
|
|
137
|
+
url += "&tags=%s" % quote_plus(tag_value, safe=",")
|
|
132
138
|
return url
|
|
133
139
|
|
|
134
140
|
|
|
@@ -147,7 +153,7 @@ def get_search_results(term, current_page, tags=None):
|
|
|
147
153
|
"""
|
|
148
154
|
api_url = get_search_api_url(term, current_page, tags=tags)
|
|
149
155
|
try:
|
|
150
|
-
response = requests.get(api_url
|
|
156
|
+
response = requests.get(api_url)
|
|
151
157
|
return response.json()
|
|
152
158
|
except Exception:
|
|
153
159
|
return {"total_hits": 0, "hits": []}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: simplesitesearch
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.5
|
|
4
4
|
Summary: Reptile Simple Site Search django app
|
|
5
5
|
Home-page: https://github.com/FlavienLouis/simplesitesearch
|
|
6
6
|
Author: Reptile Tech
|
|
@@ -285,6 +285,12 @@ For support and questions, please open an issue on the [GitHub repository](https
|
|
|
285
285
|
|
|
286
286
|
## Changelog
|
|
287
287
|
|
|
288
|
+
### 0.0.5
|
|
289
|
+
- **Fixed** tag parsing: single tag string (e.g. `Hometag`) no longer sent as `H,o,m,e,t,a,g`; string is treated as one tag. API URL keeps commas unencoded so multiple tags parse correctly.
|
|
290
|
+
|
|
291
|
+
### 0.0.4
|
|
292
|
+
- SSL verification configurable via `SITE_SEARCH_VERIFY_SSL` (default `True`).
|
|
293
|
+
|
|
288
294
|
### 0.0.3
|
|
289
295
|
- Added `simplesitesearch.utils` QOL helpers: `get_search_results`, `get_search_api_url`, `build_search_query_string`, `parse_comma_separated_tags`, `normalize_search_term`, `safe_int`
|
|
290
296
|
- Tag filter: `tag` (or `tags`) query parameter forwarded to API as comma-separated `tags`; pagination links preserve tags
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simplesitesearch-0.0.3 → simplesitesearch-0.0.5}/simplesitesearch.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|