PlaidWeb / Publ

Flexible publishing system for the web
http://publ.beesbuzz.biz/
MIT License
40 stars 4 forks source link

Make whoosh installation optional #477

Closed fluffy-critter closed 2 years ago

fluffy-critter commented 2 years ago

Expected Behavior

There shouldn't be any reason to install whoosh unless the site is configured with full-text search.

Possible Solution

In search.py, wrap import whoosh in a try/catch ImportError, and provide a proper error if the site is configured to use whoosh if it's not available. flask-caching's memcached backend has an example on one way to do this (although it seems overkill for this purpose).

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context