Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
2Activity

Table Of Contents

Preface
How the Book Is Organized
Conventions Used in This Book
Contributors to This Book
Introducing Zope
What Is A Web Application?
How You Can Benefit From Using An Application Server
Zope History
Why Use Zope Instead of Another Application Server
Zope Audiences and What Zope Isn't
Zope's Terms of Use and License and an Introduction to The Zope Community
Zope Concepts and Architecture
Fundamental Zope Concepts
Zope Is A Framework
Object Publishing
Through-The-Web Management
Security and Safe Delegation
Native Object Persistence and Transactions
Zope Is Extensible
Fundamental Zope Components
Installing and Starting Zope
Downloading Zope
Installing Zope
Installing Zope for Windows With Binaries from Zope.org
Installing Zope on Linux and Solaris With Binaries from Zope.org
Compiling and Installing Zope from Source Code
Starting Zope
Using Zope With An Existing Webserver
Starting Zope On Windows
Starting Zope on UNIX
Starting Zope As The Root User
Your Zope Installation
Logging In
Controlling the Zope Process With the Control Panel
Troubleshooting
Options To The Zope start or start.bat Script
Environment Variables that Effect Zope at Runtime
When All Else Fails
Object Orientation
Objects
Attributes
Methods
Messages
Classes and Instances
Inheritance
Object Lifetimes
Summary
Using The Zope Management Interface
Introduction
How The Zope Management Interface Relates to Objects
ZMI Frames
The Navigator Frame
The Workspace Frame
The Status Frame
Creating Objects
Moving and Renaming Objects
Transactions and Undoing Mistakes
Undo Details and Gotchas
Reviewing Change History
Importing and Exporting Objects
Using Object Properties
Using the Help System
Browsing and Searching Help
Logging Out
Using Basic Zope Objects
Basic Zope Objects
Content Objects: Folders, Files, and Images
Folders
Creating and Editing Files
Editing File Contents
Viewing Files
Images
Presentation Objects: Zope Page Templates and DTML Objects
ZPT vs. DTML: Same Purpose, Different Audiences
Zope Page Templates
Creating A Page Template
Editing A Page Template
Viewing A Page Template
DTML Objects: DTML Documents and DTML Methods
Creating DTML Methods
Editing DTML Methods
Viewing a DTML Method
Uploading an HTML File as Content for a DTML Method
Logic Objects: Script (Python) Objects and External Methods
Script (Python) Objects
Creating A Script (Python)
Editing A Script (Python)
Testing A Script (Python)
Uploading A Script (Python)
External Methods
Creating and Editing An External Method File
Creating an External Method Object
Testing An External Method Object
SQL Methods: Another Kind of Logic Object
Creating a Data Collection Form
Creatng A Script To Calculate Interest Rates
Creating A Page Template To Display Results
Using The Application
The Zope Tutorial
Acquisition
Acquisition vs. Inheritance
Acquisition is about Containment
Say What?
Providing Services
Getting Deeper with Multiple Levels
Basic DTML
How DTML Relates to Similar Languages and Templating Facilities
When To Use DTML
When Not To Use DTML
The Difference Between DTML Documents and DTML Methods
DTML Tag Syntax
DTML Tag Names, Targets, and Attributes
Creating a "Sandbox" for the Examples in This Chapter
Examples of Using DTML for Common Tasks
Inserting Text into HTML with DTML
Formatting and Displaying Sequences
Processing Input from Forms
Dealing With Errors
Dynamically Acquiring Content
Using Python Expressions from DTML
DTML Expression Gotchas
Common DTML Tags
The Var Tag
Var Tag Attributes
Var Tag Entity Syntax
The If Tag
Here's an example condition:
Name and Expression Syntax Differences
Else and Elif Tags
Using Cookies with the If Tag
The In Tag
Iterating over Folder Contents
Using Zope Page Templates
Zope Page Templates versus DTML
How Page Templates Work
Creating a Page Template
Simple Expressions
Inserting Text
Repeating Structures
Conditional Elements
Changing Attributes
Creating a File Library with Page Templates
Remote Editing with FTP and WebDAV
Debugging and Testing
XML Templates
Using Templates with Content
Creating Basic Zope Applications
Building "Instance-Space" Applications
Instance-Space Applications vs. Products
Using A Folder as A Container For Your Intstance-Space Application
Using Objects as Methods Of Folders Via URLs
Using Acquisition In Instance-Space Applications
The Special Folder Object index_html
Building the Zope Zoo Website
Navigating the Zoo
Adding a Front Page to the Zoo
Improving Navigation
Factoring out Style Sheets
Creating a File Library
Building a Guest Book
Extending the Guest Book to Generate XML
The Next Step
Users and Security
Introduction to Zope Security
Review: Logging In and Logging Out of the Zope Management Interface
Zope's "Stock" Security Setup
Identification and Authentication
Authorization, Roles, and Permissions
Managing Users
Creating Users in User Folders
Editing Users
Defining a User's Location
Working with Alternative User Folders
Zope Anonymous User
Zope Emergency User
Creating an Emergency User
Performing Security Checks
Advanced Security Issues: Ownership and Executable Content
The Problem: Trojan Horse Attacks
Roles of Executable Content
Proxy Roles
Advanced DTML
How Variables are Looked up
DTML Namespaces
DTML Client Object
DTML Method vs. DTML Document
DTML Request Object
Rendering Variables
Modifying the DTML Namespace
In Tag Namespace Modifications
Additional Notes
The With Tag
The Let Tag
DTML Namespace Utility Functions
Safe Scripting Limits
Advanced DTML Tags
The Call Tag
The Comment Tag
The Tree Tag
The Return Tag
The Sendmail Tag
The Mime Tag
The Unless Tag
Batch Processing With The In Tag
Exception Handling Tags
The Raise Tag
The Try Tag Optional Else Block
The Try Tag Optional Finally Block
Other useful examples
Forwarding a REQUEST
Calling a DTML object from a Python Script
Explicit Lookups
Conclusion
Advanced Page Templates
Advanced TAL
Advanced Content Insertion
Inserting Structure
Dummy Elements
Default Content
Advanced Repetition
Repeat Variables
Repetition Tips
Advanced Attribute Control
Defining Variables
Omitting Tags
Error Handling
Interactions Between TAL Statements
Form Processing
Expressions
String Expressions
Path Expressions
Alternate Paths
Not Expressions
Nocall Expressions
Exists Expressions
Python Expressions
Comparisons
Getting at Zope Objects
Using Scripts
Calling DTML
Python Modules
Macros
Using Macros
Macro Details
Using Slots
Customizing Default Presentation
Combining METAL and TAL
Whole Page Macros
Caching Templates
Page Template Utilities
Batching Large Sets of Information
Miscellaneous Utilities
Advanced Zope Scripting
Zope Scripts
Here is an overview of Zope's scripts:
Calling Scripts
Context
Calling Scripts From the Web
URL Traversal and Acquisition
Passing Arguments with an HTTP Query String
Calling Scripts from Other Objects
Calling Scripts from DTML
Calling scripts from Python and Perl
Calling Scripts from Page Templates
Calling Scripts: Summary and Comparison
Using Python-based Scripts
The Python Language
Creating Python-based Scripts
Binding Variables
Accessing the HTTP Request
String Processing in Python
Print Statement Support
Built-in Functions
Using External Methods
Processing XML with External Methods
External Method Gotchas
The Perl Language
Creating Perl-based Scripts
Perl-based Script Security
Advanced Acquisition
Context Acquisition Gotchas
Containment before context
One at a time
Fragility
Calling DTML from Scripts
Calling ZPT from Scripts
Passing Parameters to Scripts
Returning Values from Scripts
Script Security
Security Restrictions of Script (Python)
The Zope API
Get all objects in a folder
Get the id of an object
Get the Zope root folder
Get the physical path to an object
Get an object by path
Change the content of an DTML Method or Document
Change properties of an object
Get a property
Execute a DTML Method or DTML Document
Traverse to an object and add a new property
Add a new object to the context
DTML versus Python versus Perl versus Page Templates
Using XML-RPC
Remote Scripting with HTTP
Zope Services
Access Rule Services
Temporary Storage Services
Version Services
Caveat: Versions and ZCatalog
Caching Services
Adding a Cache Manager
Caching an Object
Outbound Mail Services
Error Logging Services
Searching and Indexing Services
Sessioning Services
Internationalization Services
Searching and Categorizing Content
Getting started with Mass Cataloging
• Creating a ZCatalog
Creating a ZCatalog
Creating Indexes
Finding and Cataloging Objects
Configuring ZCatalogs
Defining Indexes
Defining Meta Data
Searching ZCatalogs
Searching with Forms
Searching from Python
Searching and Indexing Details
Searching ZCTextIndexes
Boolean expressions
Parentheses
Wild cards
Phrase search
Lexicons
Lexicons can:
Searching Field Indexes
Searching Keyword Indexes
Searching Path Indexes
Searching DateIndexes
Searching DateRangeIndexes
Searching TopicIndexes
Advanced Searching with Records
Keyword Index Record Attributes
Allowed values:
Path Index Record Attributes
DateIndex Record Attributes
DateRangeIndex Record Attributes
TopicIndex Record Attributes
ZCTextIndex Record Attributes
Creating Records in HTML
Automatic Cataloging
Relational Database Connectivity
Common Relational Databases
Database Adapters
Z SQL Methods
Displaying Results from Z SQL Methods
Providing Arguments to Z SQL Methods
Dynamic SQL Queries
Inserting Arguments with the Sqlvar Tag
Equality Comparisons with the sqltest Tag
Creating Complex Queries with the sqlgroup Tag
Advanced Techniques
Calling Z SQL Methods with Explicit Arguments
Acquiring Arguments from other Objects
Binding Classes to Result Objects
Caching Results
Transactions
Further help
Virtual Hosting Services
Virtual Host Monster
Where to Put a Virtual Host Monster And What To Name It
Special VHM Path Elements VirtualHostBase and VirtualHostRoot
VirtualHostBase
VirtualHostRoot
Using VirtualHostRoot and VirtualHostBase Together
Testing a Virtual Host Monster
Arranginging for Incoming URLs to be Rewritten
Virtual Host Monster Mappings Tab
Apache Rewrite Rules
"Inside-Out" Virtual Hosting
Sessions
Session Configuration
Using Session Data
Details
Terminology
Default Configuration
Advanced Development Using Sessioning
Overview
Obtaining A Session Data Object
Modifying A Session Data Object
Manually Invalidating A Browser Id Cookie
An Example Of Using Session Data from DTML
Using the mapping Keyword With A Session Data Object in a dtml-with
Using Session Data From Python
Interacting with Browser Id Data
Determining Which Namespace Holds The Browser Id
Obtaining the Browser Id Name/Value Pair and Embedding It Into A Form
Determining Whether A Browser Id is "New"
Using Session onAdd and onDelete Events
Writing onAdd and onDelete Methods
Configuration and Operation
Setting Initial Transient Object Container Parameters
Instantiating Multiple Browser Id Managers (Optional)
Instantiating A Session Data Manager (Optional)
Instantiating a Transient Object Container
Configuring Sessioning Permissions
Permissions related to browser id managers:
Permissions related to session data managers:
Permissions related to transient object containers:
Concepts and Caveats
Security Considerations
Browser Id (Non-)Expiration
Session Data Object Expiration Considerations
Sessioning and Transactions
Mutable Data Stored Within Session Data Objects
Session Data Object Keys
In-Memory Session Data Container RAM Utilization
Mounted Transient Object Container Caveats
Zope Versions and Sessioning
Further Documentation
Scalability and ZEO
What is ZEO?
ZEO Caveats
Managing Zope Objects Using External Tools
General Caveats
FTP and WebDAV
Using FTP to Manage Zope Content
Determining Your Zope's FTP Port
Transferring Files with WS_FTP
Editing Zope Objects with Emacs FTP Modes
Caveats With FTP
Editing Zope Objects with WebDAV
Using a PUT_factory to Specify the Type of Objects Created With FTP and DAV
Using The External Editor Product
Other Integration Facilities
Chapter 14: Extending Zope
Creating Zope Products
Creating A Simple Product
Creating ZClasses
Creating Views of Your ZClass
Creating Properties on Your ZClass
Creating Methods on your ZClass
ObjectManager ZClasses
ZClass Security Controls
Controlling access to Methods and Property Sheets
Controlling Access to instances of Your ZClass
Providing Context-Sensitive Help for your ZClass
Using Python Base Classes
Distributing Products
Maintaining Zope
• Starting Zope automatically at boot time
Starting Zope Automatically at Boot Time
Debug Mode and Automatic Startup
Linux
Distributions with Prepackaged Zope
Automatic Startup for Custom-Built Zopes
This script lets you perform start / stop / restart operations:
Mac OS X
MS Windows
Installing New Products
Server Settings
Interpreter Check Intervals
ZServer Threads
Database Connections
Signals (POSIX only)
Monitoring
Monitor the Event Log and the Access Log
Monitor the HTTP Service
Log Files
Access Log
Event Log
Log Rotation
Packing and Backing Up the FileStorage Database
Database Recovery Tools
Appendix A: DTML Reference
Syntax
Examples
See Also
0 of .
Results for:
No results containing your search query
P. 1
ZopeBook-2_6

ZopeBook-2_6

Ratings: (0)|Views: 415 |Likes:
Published by rab_scribd

More info:

Published by: rab_scribd on Mar 30, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/30/2011

pdf

text

original

You're Reading a Free Preview
Pages 10 to 162 are not shown in this preview.
You're Reading a Free Preview
Pages 172 to 342 are not shown in this preview.
You're Reading a Free Preview
Pages 352 to 402 are not shown in this preview.
You're Reading a Free Preview
Pages 412 to 456 are not shown in this preview.
You're Reading a Free Preview
Pages 466 to 495 are not shown in this preview.

Activity (2)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->