Skip to content

Instantly share code, notes, and snippets.

@rjmoggach
Last active December 15, 2015 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjmoggach/5215990 to your computer and use it in GitHub Desktop.
Save rjmoggach/5215990 to your computer and use it in GitHub Desktop.
I use this in a site-specific app called 'theme' to add django-wiki to django-cms painlessly. With this app activated there are two app integrations available in the pages Advanced menu ("Wiki Apphook" & "Notify Apphook") Add a new subpage, select the integration, mark the page as published and in menus and django-wiki is part of the site!
# django-wiki hook for django-cms
from django.conf.urls.defaults import patterns
from cms.app_base import CMSApp
from cms.apphook_pool import apphook_pool
from django.utils.translation import ugettext_lazy as _
from wiki.urls import get_pattern as get_wiki_pattern
from django_notify.urls import get_pattern as get_notify_pattern
class WikiApphook(CMSApp):
name = _("Wiki Apphook")
urls = [patterns(get_wiki_pattern())]
apphook_pool.register(WikiApphook)
class NotifyApphook(CMSApp):
name =_("Notify Apphook")
urls = [patterns(get_notify_pattern())]
apphook_pool.register(NotifyApphook)
@profhase
Copy link

Doing this, I only see an empty page instead of wiki. If I call any of the wiki pages I am getting
CMS: Page not found for "wiki/create-root"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment