Skip to main content

No project description provided

Project description

Allows to easily index CMS pages and push them to algolia.


Install as pip install djangocms-algolia.

Add the following variables to

    'API_KEY': env.get('ALGOLIA_API_KEY', '')
# not used, but django-haystack requires it to be preset in
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 plain text from CMS 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.render import render_text_from_placeholder

class CustomModel(Model):
    placeholder = PlaceholderField('Content')

    def description(self) -> str:
        return render_text_from_placeholder(self.placeholder)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangocms-algolia- (4.0 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page