Skip to content. | Skip to navigation

Personal tools


You are here: Home / Tips / Configuration Settings

Configuration Settings

Site Setup 和 Management Interface 是 Plone 管理系統設定值的介面。


Python Package Index (PyPI)

Plone Products Directory


broken products

Time Zone 時區設定的說明

Wiki Support: Plone 4 Plone 5 Wiki Comparison collective.warmup health check

如何在程式碼裡寄送信件 建立 Maildir

自動新增內容 collective.recipe.plonesite

Change Password from a SubSite

Create Folders Automatically When Members Login collective.logbook: Advanced Exception Logging 討論是否成為核心功能

collective.mass_subscriptions: Batch Adding Users via CSV Form

collective.cron: based on and

Task Scheduling for Plone 4

Purging Old CMFEditions Versions

Configlet Icon for Dexterity: missing before Plone 4.0.2

Adding Test Users Porgrammatically Using collective.recipe.plonesite

parts =

recipe = collective.recipe.plonesite
profiles = my.project:default
post-extras = ${buildout:directory}/acceptance-tests/

import logging
logger = logging.getLogger('collective.recipe.plonesite')

test_users = [
    # (username, password, group),
    ('username1', 'password1', 'group1'),
    ('username2', 'password2', 'group2'),
    ('username3', 'password3', 'group3'),

for username, password, group in test_users:
    if username not in portal.acl_users.getUserIds():
            portal.portal_registration.addMember(username, password)
            portal.portal_groups.addPrincipalToGroup(username, group)
        except ValueError:
            logger.warn('The login name "%s" is not valid.' % username)
        except KeyError:
            logger.warn('The group "%s" is not valid.' % group)

z3c.autoinclude: includeDependencies 理論上每個模組都需要它 因為 Plone 已指定相依關係 其他模組可以省略

在 configure.zcml 裡指定 <includeDependencies package="." /> 後,會自動引入 裡的 install_requires 所列的模組,像 範例,這行為是 z3c.autoinclude 的功能,在 Plone 3.3 之後內建,另一種方式,是使用 <include package="" /> 之類的設定方式,逐行加進相依關係。在安全程度要求高的場合,使用 <five:registerPackage package="." /> 會比較好。新版 mr.migrator 也納入 autoinclude.zcml。

先利用 <grok:grok package="." /> 來註冊 schemata, view, form 資訊,

再註冊 GenericSetup profile 讓 type installable

Cleanup Left Over Interfaces


* 想要在 Shell 環境馬上看到執行效果,


Plone 4.3 and Plone 5 both use the master branch of, so you don't need to cherrypick anything.

所謂「請神容易送神難」,安裝 theme 比較容易,但是解除安裝的工作較複雜,多數的 theme 模組未必準備好 uninstall profile 內容,造成解除安裝之後,仍有後遺症要處理,同樣的,反覆安裝模組的過程,也可能造成 GenericSetup 錯誤。  講到 property 還未支援 uninstall,這代表自行放 properties.xml 到 uninstall 目錄裡無效嗎? 初步測試結果是如此。

disable Mail Server SMTP Postfix Ubuntu 16.04: 自備 Domain Name 可選 Internet 轉寄情況可選 Smarthost

$ sudo dpkg-reconfigure postfix

Setting up ssl-cert (1.0.37) ...
Setting up postfix (3.1.0-3) ...
Adding group `postfix' (GID 118) ...
Adding system user `postfix' (UID 112) ...
Adding new user `postfix' (UID 112) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/
Adding group `postdrop' (GID 119) ...
setting myhostname: cmc-studies
setting alias maps
setting alias database
changing /etc/mailname to
setting myorigin
setting destinations: $myhostname,, cmc-studies, localhost.localdomain, localhost
setting relayhost:
setting mynetworks: [::ffff:]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: all
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix is now set up with a default configuration.  If you need to make changes, edit
/etc/postfix/ (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for systemd (229-4ubuntu7) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...

Gmail Bouncing Postfix Mail Reverse PTR Record Alias

FQDN 設定方式: /etc/hosts IP mydomain 再用 hostname --fqdn 確認

Member Default Folder

Turn on/off Folder Creation and Change Folder Name

角色: 系統管理員 內容管理員 程式設計員 視覺設計員

ZODB read-only

z3c.baseregistry to create a registry specific to one add-on.

Dexterity Developer Manual

Plone 的 type 分成兩種,一是 container,一是 item,前者又稱為 folderish,後者又稱為 non-folderish,在 one-to-many (一對多) 的關係裡,通常會設計成 container (也就是 "one") 包含 item (也就是 "many") 的型式。

mr.developer 協助管理程式碼專案 (how?) (有了它,就不必指定 develop = src/* ?)

buildout.dumppickedversions 協助追蹤 buildout 挑選的版本

<!-- The personal bar -->

Plone3_Theming p.138

<!-- The personal bar -->







這表示使用自製模組的 PersonalBarViewlet 類別,再編輯 browser/ 檔案。

SchoolTool 有實作 "學年"  實作"依照時間尋找 blogitem" 實作"依照時間顯示 blog"

Package Upgrading

-from zope.component.exceptions import ComponentLookupError
+ from zope.component.interfaces import ComponentLookupError
+except ImportError:
+ # Zope < 2.10
+ from zope.component.exceptions import ComponentLookupError
-from import IObjectEvent
+from zope.component.interfaces import IObjectEvent


eggs = python-memcached lovely.memcached
python-memcached==1.44, lovely.memcached==0.1.4,, zope.intid==3.7.2, zope.keyreference==3.6.2,


-from Products.validation.interfaces import ivalidator
+from Products.validation import validation
+from Products.validation.interfaces.IValidator import IValidator
-__implements__ = (ivalidator,)
+__implements__ = IValidator

example 1:

example 2:

from Products.ATContentTypes.content.base import updateAliases not Plone 4 compatible? example for Extensions/ and GenericSetup

from Products.CMFPlone.migrations.migration_util import safeEditProperty
ImportError: No module named migrations.migration_util

-from Products.CMFPlone.migrations.migration_util import safeEditProperty
+from import safeEditProperty

Member Default Folder/p

plone.reloadeggs = python-memcached lovely.memcached


不能使用的 ID: local, search