Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install z3c.pt.compat

How to install z3c.pt.compat

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install z3c.pt.compat
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.3 Available View build log
Windows (64-bit)
0.3 Available View build log
Mac OS X (10.5+)
0.3 Available View build log
Linux (32-bit)
0.3 Available View build log
Linux (64-bit)
0.3 Available View build log
zpt
 
License
ZPL
Dependencies
Imports
Lastest release
version 0.3 on Jan 5th, 2011

This package implements a compatibility-layer between the following Zope Page Template engines:

  • z3c.pt
  • zope.pagetemplate

Usage

Use the following import-clause:

>>> from z3c.pt.compat import ViewPageTemplateFile

If the environment-variable PREFER_Z3C_PT is set to a true value, the z3c.pt engine will be used instead of zope.pagetemplate.

Binding methods

Two methods are available to bind templates and template macros to a view:

>>> from z3c.pt.compat import bind_template
>>> from z3c.pt.compat import bind_macro

Both function return render-methods that accept keyword arguments which will be passed to the template.

>>> render = bind_template(template, view)
>>> render = bind_macro(template, view, request, macro)

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.