Skip to main content

templer templates for dexterity

Project description

Introduction

Dexterity is a content-type development tool for Plone. It supports Through-The-Web and filesystem development of new content types for Plone. Templer is a Python source package skeleton creator.

templer.dexterity provides a mechanism to quickly create Dexterity add-on skeletons. It also makes it easy to add new content types to an existing skeleton. New content types built with this tool are easy to integrate with types you may have developed with Dexterity’s TTW schema editor.

This is a development tool. You should be familiar with Plone and buildout to use it. You should have already installed Dexterity in your Plone development instance and be ready to start learning to use it.

Installation

Add these lines into buildout.cfg:

[buildout]
parts =
   templer

[templer]
recipe = zc.recipe.egg
eggs =
   PasteScript
   templer.core
   templer.zope
   templer.plone
   templer.dexterity
   ${instance:eggs}

Where instance is the part name of a Zope instance or ZODB client.

Run buildout.

Usage

Creating a dexterity content package, typically done in your buildout’s src directory:

../bin/templer dexterity

Adding a content-type skeleton to an existing package:

cd yourbuildout/src/your-product/src
../../../bin/paster add content_type

Adding a behavior skeleton:

cd yourbuildout/src/your-product/src
../../../bin/paster add behavior

You must add your new project to your buildout and run buildout before adding content types or behaviors to your new package.

Notes

Egg Directories

In order to support local commands, templer will create Paste, PasteDeploy and PasteScript eggs inside your product. These are only needed for development. You can and should remove them from your add-on distribution.

Also remove:

setup_requires=["PasteScript"],
paster_plugins=["templer.localcommands"],

from the packages setup.py.

Errors

If you hit and error like this:

pkg_resources.DistributionNotFound: plone.app.relationfield:
Not Found for: my.product (did you run python setup.py develop?)

when attempting to run paster add, then you need to ensure that Paster knows about all the relevant eggs from your buildout.

Add ${instance:eggs} to your paster section in your buildout, thusly:

[templer]
recipe = zc.recipe.egg
eggs =
   ...
   ${instance:eggs}
   entry-points = paster=paste.script.command:run

where instance is the name of your plone.recipe.zope2instance section. Re-run the buildout and the issue should be resolved.

Changelog

1.0a1

  • Mostly derived from zopeskel.dexterity; see that project’s repository for earlier history. [smcmahon]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

templer.dexterity-1.0a1.zip (27.1 kB view details)

Uploaded Source

File details

Details for the file templer.dexterity-1.0a1.zip.

File metadata

File hashes

Hashes for templer.dexterity-1.0a1.zip
Algorithm Hash digest
SHA256 0ea221cf88594dee1317d9171e163335a31303f77dfec1111ea73c4e3e17432d
MD5 3d1c1a950eaf9f055774e7dd899be2bc
BLAKE2b-256 029a2b9f11a2e5792056cdae2ac8fe21a46d86d190a06f332467b1a5c75ae1f8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page