Skip to content

Python Code Templates for Plone Projects with mr.bob

License

GPL-2.0, Unknown licenses found

Licenses found

GPL-2.0
LICENSE.GPL
Unknown
LICENSE.rst
Notifications You must be signed in to change notification settings

root15rcmec/bobtemplates.plone

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

bobtemplates.plone

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

Features

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

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 author.
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 the Default Plone 5 theme Barceloneta in the folder theme/ and registers it in profiles/default/theme.xml

Compatibility

Add-ons 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.

Documentation

Full documentation for end users can be found in the "docs" folder.

It is also available online at http://docs.plone.org/develop/addons/bobtemplates.plone/bobtemplates.plone/README.html

Installation

Use in a buildout

[buildout]
parts += mrbob

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

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

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

Or to create a new theme package:

mrbob -O plonetheme.tango bobtemplates:plone_theme_package
cd plonetheme.tango/
pip install -r requirements.txt
buildout bootstrap
bin/buildout

And launch the buildout using the command:

bin/instance fg

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

This will create a new folder collective.foo. Inside the folder you have usually a buildout setup, which you can initialize as follow:

pip install -r requirements.txt

if you don't see any requirements.txt, add this file with the following content before you run the pip command above:

setuptools == 24.3.0
zc.buildout == 2.5.3

Now run:

buildout bootstrap

Your buildout should be ready to use now.

See the documentation of mr.bob for further information.

Contribute

Support

If you are having issues, please let us know.

About

Python Code Templates for Plone Projects with mr.bob

Resources

License

GPL-2.0, Unknown licenses found

Licenses found

GPL-2.0
LICENSE.GPL
Unknown
LICENSE.rst

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 82.6%
  • Python 16.3%
  • Other 1.1%