search module, wip
This commit is contained in:
parent
c2404760b8
commit
312c61ef61
11 changed files with 59 additions and 5 deletions
15
realms/modules/search/hooks.py
Normal file
15
realms/modules/search/hooks.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
from realms.modules.wiki.models import Wiki
|
||||
from realms.modules.search.models import Search
|
||||
|
||||
|
||||
@Wiki.after('write_page')
|
||||
def wiki_write_page(name, content, **kwargs):
|
||||
body = dict(name=name,
|
||||
content=content)
|
||||
body.update(kwargs)
|
||||
return Search.index('wiki', 'page', body=body)
|
||||
|
||||
|
||||
@Wiki.after('rename_page')
|
||||
def wiki_rename_page(*args, **kwargs):
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue