Date post: | 15-Jan-2015 |
Category: |
Technology |
Upload: | tsungwei-hu |
View: | 411 times |
Download: | 3 times |
Python 與 Plone 研習
2012 Taipei
marr.tw @ gmail.com
Plone = Python based CMS
CMS = Content in DatabaseAdded/Edited by User/Group
Managed via WorkflowSearchable with Index/Catalog
Plone = Python based CMS
CMS = Content in DatabaseAdded/Edited by User/Group
Managed via WorkflowSearchable with Index/Catalog
2 Admin Interfaces
ZMIhttp://localhost:8080/manage
Plone Setup
2 Browsers to See DisplayDisplay for Logged in User might be
different than Anonymous User
Content ID = URL
http://localhost:8080/mysitehttp://mysite.com/my_folder/my_itemhttp://mysite.com/my_item/edithttp://mysite.com/managehttp://mysite.com/@@manage-viewlets
Default Content Items
Example Page Editing
Example Page Viewing
One Folder Different Display
Example News Viewing
Example News Viewing
Python Building Blocks
Python Packages are distributed as Eggs
Python Package Indexhttp://pypi.python.org/
Example:easy_install docutils
pip docutils
Extend Plone with Add-onsPlone Add-on (Product) =~ Python Package (Egg)
Extend Plone with Add-onsPlone Add-on (Product) =~ Python Package (Egg)
How Plone Add-ons Work
Add-on Example: collective.geo
Edit buildout.cfg :
eggs = Plone Pillow lxml collective.geo.bundle
Manage Contents – The Hard Way
bin/plonectl debug
bin/plonectl run my_script.py
Undo Makes Life Easier
Import/Export Saves Your Day
Customization
CSS, JavaScript, SkinViewlet, Portlet
Theme
• Debug Mode for Responsive Update• Default Theme = Sunburst• http://localhost:8080/@@manage-viewlets• ZMI portal_skin / ploneCustom• Firefox + Firebug
Look Before You Code
模組軟體集散地http://plone.org/products
http://pypi.python.org/
Example: Stop Road Killing
IncidentContentType
Title
Description
Poster Name
Permissions and Roles
Catalog: Index and Metadata
ZMI / portal_catalog
Browser View
http://mysite.com/my_item/@@my_view
Workflow
States 狀態Transitions 動作
Content Rule
Triggering Event:• Object added to this container• Object modified• Object removed from this container• Workflow state changed
Live Search
EEA Faceted Navigation提供搜尋結果即時過濾功能
http://plone.org/products/eea.facetednavigation
Diazo
http://diazo.org/