Skip to content

Instantly share code, notes, and snippets.

@webbyfox
Last active July 24, 2018 08:47
Show Gist options
  • Save webbyfox/9e0f4ee5bdb467b647c10c08ea5f4f19 to your computer and use it in GitHub Desktop.
Save webbyfox/9e0f4ee5bdb467b647c10c08ea5f4f19 to your computer and use it in GitHub Desktop.
from cms.app_base import CMSAppConfig
from .models import TestModel1, TestModel2
class TestModel1Config():
fields = ['field1', 'field2']
model = TestModel1
# any other configuration including admin listing can go here
class TestModel2Config():
fields = ['field1', 'field2']
model = TestModel2
# any other configuration including admin listing can go here
class CMSApp2Config(CMSAppConfig):
djangocms_internalsearch_enabled = True
internalsearch_config_list = [TestModel1Config, TestModel2Config]
@czpython
Copy link

  • replace get_model with an attribute called model
  • search_models is too generic, use internalsearch_models

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