This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of ssh://github.com/ic-labs/django-icekit into…
… develop
- Loading branch information
Showing
170 changed files
with
4,874 additions
and
565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ Add custom functionality to your site. | |
* [Layouts] | ||
* [Placeholders] | ||
* [Publishing] | ||
* [Workflow] | ||
* [Page trees and mptt] | ||
* [Articles] | ||
* [Writing portable apps] | ||
|
@@ -96,6 +97,7 @@ team at [the Interaction Consortium]: [[email protected]](mailto:labs@inte | |
[Articles]: topics/articles.md | ||
[Placeholders]: topics/placeholders.md | ||
[Publishing]: topics/publishing.md | ||
[Workflow]: topics/workflow.md | ||
[Page trees and mptt]: topics/page-trees-and-mptt.md | ||
[Writing portable apps]: topics/portable-apps.md | ||
[Release notes]: changelog.md | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Celery | ||
|
||
In ICEkit background tasks are queued using Celery, and scheduled in | ||
`crontab`-like fashion using CeleryBeat. | ||
|
||
## To check Celery tasks are running | ||
check the log (stdout) of the Celery Docker container for actual tasks being | ||
executed. Check the logs (stdout) of the celerybeat container to ensure the | ||
scheduled tasks process is running. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Search in ICEkit | ||
|
||
ICEkit uses Haystack with an Elastic Search backend for its onsite search. | ||
|
||
It comes with a simple SearchIndex, `icekit.utils.search.AbstractLayoutIndex` | ||
which works well on content that: | ||
|
||
* Implements the `ListableMixin` for getting list content | ||
* Uses fluent contents (having a number of rich content placeholders) | ||
* Is publishable (the index queryset defaults to `objects.published()`) | ||
* Is polymorphic (the `django_ct` value always matches `get_model()`, rather | ||
than varying by the object being indexed. | ||
|
||
ICEkit and GLAMkit's default content types use this index: | ||
|
||
* Page (including LayoutPage, ArticleListingPage, etc.) | ||
* Article | ||
* Author | ||
|
||
And in optional libraries: | ||
* icekit_events.EventBase | ||
* icekit_press_releases.PressRelease | ||
* glamkit_collections.WorkBase | ||
* glamkit_collections.CreatorBase | ||
* etc. | ||
|
||
`AbstractLayoutIndex` renders the `search/indexes/icekit/default.txt` template | ||
which indexes ListableMixin content, all Fluent placeholders, and some common | ||
content fields. You can render a different template in your search index by | ||
redeclaring the `title` field. HTML tags are stripped and HTML entities are | ||
converted to unicode. | ||
|
||
## Using `AbstractLayoutIndex` | ||
|
||
As minimal example, create `search_indexes.py` on a publishable, `ListableMixin` | ||
model: | ||
|
||
from haystack import indexes | ||
from icekit.utils.search import AbstractLayoutIndex | ||
from . import models | ||
|
||
class MyModelIndex(AbstractLayoutIndex, indexes.Indexable): | ||
def get_model(self): | ||
return models.MyModel | ||
|
||
Publish the content you want to be indexed, then run `manage.py update_index`. | ||
|
||
## Search Page | ||
|
||
The `icekit.page_types.search_page` page plugin implements a search page. | ||
To use it for your site, create a search page, and preview/publish it. |
Oops, something went wrong.