No project description provided
Project description
Allows to easily index CMS pages and push them to algolia.
Usage
Install as pip install djangocms-algolia.
Add the following variables to settings.py:
INSTALLED_APPS = [
'djangocms_algolia',
'algoliasearch_django',
]
ALGOLIA = {
'APPLICATION_ID': env.get('ALGOLIA_APPLICATION_ID', ''),
'API_KEY': env.get('ALGOLIA_API_KEY', '')
}
# not used, but django-haystack requires it to be preset in settings.py
HAYSTACK_CONNECTIONS = {'default': {'ENGINE': 'haystack.backends.simple_backend.SimpleEngine'}}
You can exclude plugins from indexing by adding them to settings.ALDRYN_SEARCH_EXCLUDED_PLUGINS.
You can also limit the CMS pages content using settings.ALGOLIA_SEARCH_INDEX_TEXT_LIMIT.
Render plan text from placeholders
This package also includes a function that helps to index django models which utilize PlaceholderField.
You can use it as following:
from djangocms_algolia.utils import render_text_from_placeholder
class CustomModel(Model):
placeholder = PlaceholderField('Content')
def description(self) -> str:
return render_text_from_placeholder(self.placeholder)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file djangocms-algolia-1.3.2.0.tar.gz.
File metadata
- Download URL: djangocms-algolia-1.3.2.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43e27deace4c8f422981867e36cefea52e1f6649a46a758f612df5df17f603ce
|
|
| MD5 |
d4af1f3915c9d063359cf5543400d0a7
|
|
| BLAKE2b-256 |
43a772b6d94e02290f51e0b1e0899ec82328b1346f976ba5d19ba7b191a43207
|
File details
Details for the file djangocms_algolia-1.3.2.0-py3-none-any.whl.
File metadata
- Download URL: djangocms_algolia-1.3.2.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
233d0bffec23441fcb66a755d4229b4f87ba07f77d783b17efd9e61080e224e5
|
|
| MD5 |
e876ae51e12022ffd6157646a73e49f5
|
|
| BLAKE2b-256 |
e3c70e00045d651b4a2aaef5fa909d39a899aaefe176827788b0d721fe51f44d
|