forked from ungleich-public/dynamicweb
clone cms with menus, make menus standalone app
This commit is contained in:
parent
1ece5ce7c7
commit
afb096b7a3
1153 changed files with 318897 additions and 37 deletions
31
cms/test_utils/project/mti_pluginapp/cms_plugins.py
Normal file
31
cms/test_utils/project/mti_pluginapp/cms_plugins.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
from cms.plugin_base import CMSPluginBase
|
||||
from cms.plugin_pool import plugin_pool
|
||||
|
||||
from .models import TestPluginAlphaModel, TestPluginBetaModel
|
||||
|
||||
|
||||
class TestPluginAlpha(CMSPluginBase):
|
||||
model = TestPluginAlphaModel
|
||||
render_template = 'mti_pluginapp/alpha.html'
|
||||
name = 'test mti plugin alpha'
|
||||
|
||||
def render(self, context, instance, placeholder):
|
||||
context['alpha'] = instance.alpha
|
||||
return context
|
||||
|
||||
|
||||
plugin_pool.register_plugin(TestPluginAlpha)
|
||||
|
||||
|
||||
class TestPluginBeta(CMSPluginBase):
|
||||
model = TestPluginBetaModel
|
||||
render_template = 'mti_pluginapp/beta.html'
|
||||
name = 'test mti plugin beta'
|
||||
|
||||
def render(self, context, instance, placeholder):
|
||||
context['alpha'] = instance.alpha
|
||||
context['beta'] = instance.beta
|
||||
return context
|
||||
|
||||
|
||||
plugin_pool.register_plugin(TestPluginBeta)
|
||||
Loading…
Add table
Add a link
Reference in a new issue