Test the plugin Now you can restart the runserver (required because you added the new cms_plugins.py file would be useful to restrict this to pages that are actually relevant. The first thing to add is a test right at the start of the populate() method: def populate(self): if not self.is_current_app: return shell >>> from importlib import import_module >>> m = import_module("myapp.cms_plugins") >>> m.some_test_function() Storing configuration In many cases, you want to store configuration for your plugin instances
0 码力 | 298 页 | 1.79 MB | 6 月前
3
  • epub文档 django cms 3.4.x Documentation

    configuration Serve multiple languages Work with templates Extend Page & Title models Extend the Toolbar Test your extensions Use placeholders outside the CMS Manage caching Enable frontend editing for Page and shell >>> from importlib import import_module >>> m = import_module("myapp.cms_plugins") >>> m.some_test_function() Storing configuration In many cases, you want to store configuration for your plugin ugettext_lazy as _ from cms.menu_bases import CMSAttachMenu class TestMenu(CMSAttachMenu): name = _("test menu") def get_nodes(self, request): nodes = [] n = NavigationNode(_('sample root
    0 码力 | 395 页 | 1.64 MB | 1 年前
    3
  • pdf文档 django cms 3.6.x Documentation

    choice_text }}
    {% endfor %}
  • Test the plugin Now you can restart the runserver (required because you added the new cms_plugins.py file would be useful to restrict this to pages that are actually relevant. The first thing to add is a test right at the start of the populate() method: def populate(self): if not self.is_current_app: return shell >>> from importlib import import_module >>> m = import_module("myapp.cms_plugins") >>> m.some_test_function() 54 Chapter 4. Software version requirements and release notes django cms Documentation
    0 码力 | 278 页 | 1.63 MB | 1 年前
    3
  • epub文档 django cms 3.5.x Documentation

    configuration Serve multiple languages Work with templates Extend Page & Title models Extend the Toolbar Test your extensions Use placeholders outside the CMS Manage caching Enable frontend editing for Page and shell >>> from importlib import import_module >>> m = import_module("myapp.cms_plugins") >>> m.some_test_function() Storing configuration In many cases, you want to store configuration for your plugin ugettext_lazy as _ from cms.menu_bases import CMSAttachMenu class TestMenu(CMSAttachMenu): name = _("test menu") def get_nodes(self, request): nodes = [] n = NavigationNode(_('sample root
    0 码力 | 403 页 | 1.69 MB | 1 年前
    3
  • pdf文档 Django CMS 4.0.x Documentation

    choice.choice_text }}
    {% endfor %} Test the plugin Now you can restart the runserver (required because you added the new cms_plugins.py file would be useful to restrict this to pages that are actually relevant. The first thing to add is a test right at the start of the populate() method: def populate(self): if not self.is_current_app: return shell >>> from importlib import import_module >>> m = import_module("myapp.cms_plugins") >>> m.some_test_function() Storing configuration In many cases, you want to store configuration for your plugin instances
    0 码力 | 296 页 | 1.79 MB | 6 月前
    3
  • 共 83 条前往