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

plone/bobtemplates.plone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Latest Version Egg Status

Supported - Python Versions

License

bobtemplates.plone

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

Note

With the plonecli, we have a nice command line client for bobtemplates.plone. We highly recommend to use the plonecli, because it adds auto completion and some nice helpers to bobtemplates.plone.

Features

Package created with bobtemplates.plone use the current best-practices when creating an add-on. It also support's GIT by default, to keep track of changes one is doing with the bobtemplates.

Provided templates

  • addon
  • buildout (useful setup a development buildout or to test new pending Plone versions)

Provided subtemplates

These templates are meant to be used inside a package which was created by the addon template.

  • behavior
  • content_type
  • controlpanel
  • form
  • indexer
  • mockup_pattern
  • portlet
  • restapi_service
  • subscriber
  • svelte_app
  • theme
  • theme_barceloneta
  • theme_basic
  • upgrade_step
  • view
  • viewlet
  • vocabulary

Compatibility

Add-on's created with bobtemplates.plone are tested to work in Plone >= 5.2 and Python >= 3.7. the only exceptions are the theming templates. Those are Plone 6 only, because the markup and Diazo rules have changed.

If you need to create Plone packages for older versions of Plone and Python, please use bobtemplates.plone 5.x. It should work on Linux, Mac and Windows.

Documentation

Full documentation for end users and template developers can be found on bobtemplatesplone.readthedocs.io.

plonecli

For easy usage see: plonecli

Installation

You can install bobtemplates.plone as every other normal Python package with pip user global or inside a virtualenv or better with pipx.

Installation with pip global for a user

pip install bobtemplates.plone --user

Installation with pipx

pipx installs bobtemplates.plone and all dependencies in a global isolated virtualenv.

pipx install bobtemplates.plone

Installation with pip in a virtualenv

You can also install bobtemplates.plone with pip in a virtualenv. If you don't have an active virtualenv, you can create one inside your project directory.

python3 -m venv venv

Then either activate the virtualenv:

source ./venv/bin/activate

or just use the binaries directly inside the bin folder as below:

./venv/bin/pip install bobtemplates.plone

Usage

As bobtemplates.plone is a template for mr.bob, we use mrbob to run the templates.

If you are using pipx or have bobtemplates.plone globally installed, you can just use mrbob directly.

mrbob bobtemplates.plone:addon -O src/collective.foo

If you are using an unactivated virtualenv, you can use mrbob like this:

./venv/bin/mrbob bobtemplates.plone:addon -O src/collective.foo

If you are using an activated virtualenv, you can use mrbob like this:

Activate your virtualenv:

source venv/bin/activate
mrbob bobtemplates.plone:addon -O src/collective.foo

This will create your Plone package inside the src directory.

See the documentation of mr.bob for further information.

Configuration

You can set all mr.bob configuration parameters in your ~/.mrbob file.

Here is an example:

[mr.bob]
verbose = False

[variables]
author.name = Maik Derstappen
author.email = md@derico.de
author.github.user = MrTango
plone.version = 5.1.3-pending
#package.git.init = y
#package.git.autocommit = n
#package.git.disabled = n

[defaults]
dexterity_type_global_allow = n
dexterity_type_filter_content_types = y
dexterity_type_activate_default_behaviors = n
dexterity_type_supermodel = n

Contribute

Support

If you are having issues, please let us know. Just open an issue here.

About

Python Code Templates for Plone Projects with mr.bob

Topics

Resources

License

GPL-2.0, Unknown licenses found

Licenses found

GPL-2.0
LICENSE.GPL
Unknown
LICENSE.rst

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages