Skip to main content

Templates for Plone projects.

Project description

Introduction

https://secure.travis-ci.org/plone/bobtemplates.plone.png?branch=master Coveralls Downloads Latest Version Egg Status License

bobtemplates.plone provides a mr.bob template to generate packages for Plone projects.

To create a package like collective.myaddon:

$ pip install bobtemplates.plone
$ mrbob -O collective.myaddon bobtemplates:plone_addon

You can also create a package with nested namespace:

$ mrbob -O collective.foo.myaddon bobtemplates:plone_addon

Options

On creating a package you can choose from the following options. The default value is in [square brackets]:

Package Type? [Basic]

Options are Basic, Dexterity and Theme.

Author’s name

Should be something like ‘John Smith’.

Author’s email

Should be something like ‘john@plone.org’.

Author’s github username

Should be something like ‘john’.

Package description [An add-on for Plone]

One-liner describing what this package does. Should be something like ‘Plone add-on that …’.

Plone version [4.3.7]

Which Plone version would you like to use?

Features

Package created with bobtemplates.plone use the current best-practices when creating an addon.

Buildout

The package is contained in a buildout that allows you to build Plone with the new package installed for testing-purposes.

Tests

The package comes with a test setup and some tests for installing the package. It also contains a robot-test that tests logging in. The buildout also contains a config to allow testing the package on travis that sends notifications by email to the package autor.

Profile

The package contains a Generic Setup Profile that installs a browserlayer. For Plone 5 it also contains a uninstall-profile.

Locales

The package registers a directory for locales.

Template-Overrides

The package registers the folder browser/overrides as a directory where you can drop template-overrides using z3c.jbot.

Setuphandler

The package contains a setuphandlers.py where you can add code that is executed on installing the package. For Plone 5 there is also a method in setuphandler.py that is run on uninstalling.

The package-types Dexterity and Theme add the following to Basic:

Dexterity

Adds a simple content-type (you get asked about its name) in profiles/default/types/ with a python-schema in interfaces.py.

Theme

Adds a simple bootstrap-based Diazo theme in the folder theme/ and registers it in profiles/default/theme.xml

Compatibility

Addons created with bobtemplates.plone are tested to work in Plone 4.3.x and Plone 5. They should also work with older versions but that was not tested. It should work on Linux, Mac and Windows.

Installation

Use in a buildout

[buildout]
parts += mrbob

[mrbob]
recipe = zc.recipe.egg
eggs =
    mr.bob
    bobtemplates.plone

This creates a mrbob-executeable in your bin-directory. Call it from the src-directory of your Plone project like this.:

$ ../bin/mrbob -O collective.foo bobtemplates:plone_addon

Installation in a virtualenv

You can also install bobtemplates.plone in a virtualenv.:

$ pip install bobtemplates.plone

With pip 6.0 or newer mr.bob will automatically be installed as a dependency. If you still use a older version of pip you need install mr.bob before bobtemplates.plone.:

$ pip install mr.bob

Now you can use it like this:

$ mrbob -O collective.foo bobtemplates:plone_addon

See mr.bob documentation for further information.

Contributors

This package is based on bobtemplates.niteoweb and bobtemplates.ecreall

  • Philip Bauer [pbauer]

  • Cédric Messiant [cedricmessiant]

  • Vincent Fretin [vincentfretin]

  • Thomas Desvenain [thomasdesvenain]

  • Domen Kožar [iElectric]

  • Nejc Zupan [zupo]

  • Patrick Gerken [do3cc]

  • Timo Stollenwerk [timo]

Changelog

1.0.1 (2015-12-12)

  • Register locales directory before loading dependencies to avoid issues when overriding translations. [hvelarde]

1.0 (2015-10-02)

  • Upgrade to Plone 4.3.7 and 5.0. [timo]

  • Avoid pyflakes warnings for long package names. [maurits]

1.0b1 (2015-09-17)

  • Always start with 1.0a1. No more 0.x releases please. [timo]

  • Use Plone minor version for setup.py classifier. So 4.3 instead of 4.3.6. [maurits]

  • Enabled robot part in generated package. [maurits]

  • Fix #84 Make travis cache the egg directory of the generated package. [jensens]

  • Update tests to use Plone 5.0b3. [jensens]

  • Remove unittest2 dependency. [gforcada]

0.11 (2015-07-24)

  • Fix update.sh [pbauer]

  • Add i18ndude to buildout [pbauer]

  • Fix package-creation on Windows. Fixes #72. [pbauer]

  • Add packagename to licence. [pbauer]

  • Add uninstall-profile for Plone 5. [pbauer]

  • Fix indentation to follow the conventions of plone.api. [pbauer]

  • Move badges from pypin to shields.io. [timo]

  • Fix coverage on travis template. [gil-cano]

  • Enable code analysis on travis and fail if the code does not pass. [gforcada]

0.10 (2015-06-15)

  • Add check-readme script that detects Restructured Text issues. [timo]

  • Use only version up to minor version in setup.py of package #56. [tomgross]

  • Use class method to load ZCML in tests. [tomgross]

  • Upgrade default Plone version to 4.3.6. [timo]

  • Add zest.releaser to package buildout. [timo]

  • Update README according to Plone docs best practice. [do3cc, timo]

  • Add flake8-extensions to code-analysis. [timo]

  • Upgrade Selenium to 2.46.0. [timo, pbauer]

  • Don’t create a type-schema unless it is needed. [pbauer]

0.9 (2015-03-24)

  • Add Theme package type with simple bootstrap-based theme. [timo]

  • Add Dexterity package type. [timo]

  • Remove example view. [timo]

  • Remove question for keywords. [timo]

  • Remove question for locales. [timo]

  • Remove questions for version and license. [timo]

  • Remove questions for profile, setuphandler, and testing. [timo]

  • Unify buildout configuration in buildout.cfg [timo]

  • Fix bootstrap command in travis.yml. [timo]

0.8 (2015-02-06)

  • Add includeDependencies. This fixes #23. [timo]

0.7 (2015-02-05)

  • Use latest buildout-bootstrap.py. [timo]

  • Fix failing nosetests. [timo]

  • Add test that creates an add_on and runs all its tests and code analysis. [timo]

  • Run tests on travis. [timo]

  • Run code analysis on travis. Build fails on PEP8 violations. [timo]

  • Add code analysis. [timo]

  • Remove z2.InstallProducts. Not needed any longer. [timo]

  • Use testing best practices and follow common naming conventions. [timo]

  • Remove testing profile. Global testing state is considered an anti-pattern. [timo]

  • Add example robot test. [timo]

  • Add travis and pypip.in badges. [timo]

  • Run code analysis on the generated addon as well within the tests to make sure we always ship 100% PEP8 compliant code. [timo]

  • Add REMOTE_LIBRARY_BUNDLE_FIXTURE to acceptance test fixture. [timo]

0.6 (2015-01-17)

  • Use PLONE_APP_CONTENTTYPES_FIXTURE for tests on when using Plone 5. [pbauer]

0.5 (2015-01-17)

  • Remove useless base-classes for tests. Use ‘layer = xxx’ instead. [pbauer]

  • Fix some minor code-analysis issues. [pbauer]

  • Added .editorconfig file. [ale-rt]

0.4 (2014-12-08)

  • Remove grok. [pbauer]

  • Fix missed removals when testing was deselected. [pbauer]

  • Only use jbot when there is a profile and a browser layer. [pbauer]

  • Get username and email from git. [do3cc]

0.3 (2014-12-07)

  • Pinn robotframework to 2.8.4 to fix package-tests. [pbauer]

  • Add browserlayer to demoview to allow multiple addons. [pbauer]

  • Fix creation of nested packages (wrong __init__.py). [pbauer]

0.2 (2014-12-07)

  • Fix documentation [pbauer]

0.1 (2014-12-07)

  • Get namespace, name and type from target-dir. [pbauer]

  • Remove obsolete plone_addon_nested. Auto-nest package in after-render hook. [pbauer]

  • Add many new features. Most of them are optional. [pbauer]

  • Initial import based on bobtemplates.ecreall by cedricmessiant, vincentfretin and thomasdesvenain. [pbauer]

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

bobtemplates.plone-1.0.1.tar.gz (41.2 kB view hashes)

Uploaded Source

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