Back to Basics: Designing Classes (part 1 of 2)
Back to Basics Designing Classes (part 1 of 2) Klaus Iglberger, CppCon 2021 klaus.iglberger@gmx.de2 Klaus Iglberger C++ Trainer/Consultant Author of the C++ math library (Co-)Organizer Beck, TDD by Example)The Challenge of Class Design 10 Guideline: Design classes for easy change. Guideline: Design classes for easy extensions.Design Guidelines 11 Back to Basics: Class Design (Part ) const; 23 Using inheritance naively to solve our problem easily leads to … … many derived classes; … ridiculous class names; … deep inheritance hierarchies; … duplication between similar implementations0 码力 | 87 页 | 5.64 MB | 5 月前3Back to Basics: Designing Classes (part 2 of 2)
Back to Basics Designing Classes (part 1 of 2) Klaus Iglberger, CppCon 2021 klaus.iglberger@gmx.de2 Klaus Iglberger C++ Trainer/Consultant Author of the C++ math library (Co-)Organizer duplication to enable you to change everything in one place (the DRY principle). Guideline: Design classes for easy change.Data Member Initialization 24 struct Widget { Widget() : Widget(42) // Decisions 63 Guideline: Encapsulate design decisions (i.e. variation points). Guideline: Design classes for easy change.Qualified/Modified Member Data 64 Back to Basics: Class Design (Part 1) The Challenge0 码力 | 76 页 | 2.60 MB | 5 月前3Django CMS 3.0.x Documentation
yes • Languages to enable. Option can be provided multiple times, or as a comma separated list: en, de • Optional default time zone: America/Chicago: • Activate Django timezone support: yes • Activate CMS return context plugin_pool.register_plugin(CMSPollPlugin) # register the plugin Note: All plugin classes must inherit from cms.plugin_base.CMSPluginBase and must register them- selves with the cms.plugin_pool gets shown in the toolbar. One is the CMS_TOOLBARS setting. This gives you full control over which classes are loaded, but requires that you specify them all manually. The other is to provide cms_toolbar0 码力 | 180 页 | 1.56 MB | 6 月前3Django CMS 3.11.10 Documentation
Explanation and analysis of some key concepts in django CMS. Reference Technical reference material, for classes, methods, APIs, commands. Join us online The django CMS Association [https://www.django-cms.org/en/about-us/] are not migrating a version 3 project Add to settings.py: LANGUAGES = [ ("en", "English"), ("de", "German"), ("it", "Italian"), ] LANGUAGE_CODE = "en" pip install psycopg2 # for Postgres makemigrations polls_cms_integration python manage.py migrate polls_cms_integration Note All plugin classes must inherit from cms.plugin_base.CMSPluginBase and must register themselves with the plugin_pool0 码力 | 493 页 | 1.44 MB | 6 月前0.03Django CMS 4.1.x Documentation
Explanation and analysis of some key concepts in django CMS. Reference Technical reference material, for classes, methods, APIs, commands. Join us online The django CMS Association [https://www.django-cms.org/en/about-us/] 2/ref/settings/#std-setting-DATABASES]. Note "djangocms_admin_style", LANGUAGES = [ ("en", "English"), ("de", "German"), ("it", "Italian"), ] LANGUAGE_CODE = "en" For deployment, you’ll need to use a makemigrations polls_cms_integration python manage.py migrate polls_cms_integration Note All plugin classes must inherit from cms.plugin_base.CMSPluginBase and must register themselves with the plugin_pool0 码力 | 518 页 | 1.66 MB | 6 月前3Django CMS 3.9.x Documentation
and analysis of some key concepts in django CMS. 1.4 Reference Technical reference material, for classes, methods, APIs, commands. 3 django cms Documentation, Release 3.10.0 4 Chapter 1. Overview CHAPTER instance, placeholder): context.update({'instance': instance}) return context Note: All plugin classes must inherit from cms.plugin_base.CMSPluginBase and must register themselves with the plugin_pool register the toolbar This is just a basic example, and there’s a lot more to django CMS toolbar classes than this - see How to extend the 24 Chapter 4. Software version requirements and release notes0 码力 | 298 页 | 1.79 MB | 6 月前3Django CMS 2.4.x Documentation
either via {% language %} templatetag or via activate("de") function call in views. Before: {% url "de:myview" %} After: {% load i18n %}{% language "de" %} {% url "myview_name" %} {% endlanguage %} • reverse in a cookie with every response. To enable this middleware add the following to your MIDDLEWARE_CLASSES setting: cms.middleware.language.LanguageCookieMiddleware CMS_LANGUAGES CMS_LANGUAGES has be overhauled 'en', 'name': gettext('English'), 'fallbacks': ['de', 'fr'], 'public': True, 'hide_untranslated': True, 'redirect_on_fallback':False, }, { 'code': 'de', 'name': gettext('Deutsch'), 'fallbacks': ['en',0 码力 | 104 页 | 709.98 KB | 6 月前3Django CMS 3.9.x Documentation
Explanation and analysis of some key concepts in django CMS. Reference Technical reference material, for classes, methods, APIs, commands. Join us online The django CMS Association [https://www.django-cms.org/en/about-us/] placeholder): context.update({'instance': instance}) return context Note All plugin classes must inherit from cms.plugin_base.CMSPluginBase and must register themselves with the plugin_pool register the toolbar This is just a basic example, and there’s a lot more to django CMS toolbar classes than this - see How to extend the Toolbar for more. 7. Extending the navigation menu You may have0 码力 | 417 页 | 1.68 MB | 6 月前3Django CMS 4.0.x Documentation
and analysis of some key concepts in django CMS. 1.4 Reference Technical reference material, for classes, methods, APIs, commands. 3 django cms Documentation, Release 3.9.0 4 Chapter 1. Overview CHAPTER (continued from previous page) context.update({'instance': instance}) return context Note: All plugin classes must inherit from cms.plugin_base.CMSPluginBase and must register themselves with the plugin_pool register the toolbar This is just a basic example, and there’s a lot more to django CMS toolbar classes than this - see How to extend the Toolbar for more. Extending the navigation menu You may have noticed0 码力 | 296 页 | 1.79 MB | 6 月前3Django CMS 3.8.x Documentation
Explanation and analysis of some key concepts in django CMS. Reference Technical reference material, for classes, methods, APIs, commands. Join us online django CMS is supported by a friendly and very knowledgeable placeholder): context.update({'instance': instance}) return context Note All plugin classes must inherit from cms.plugin_base.CMSPluginBase and must register themselves with the plugin_pool register the toolbar This is just a basic example, and there’s a lot more to django CMS toolbar classes than this - see How to extend the Toolbar for more. 7. Extending the navigation menu You may have0 码力 | 413 页 | 1.67 MB | 6 月前3
共 268 条
- 1
- 2
- 3
- 4
- 5
- 6
- 27