Skip to content

Kotti/bobtemplates.kotti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unmaintained / superceded

Please use the scaffold provided by Kotti instead:

pcreate -s kotti my_project

Introduction

bobtemplates.kotti provides mr.bob templates to generate packages for the Kotti CMS

Available templates are:

  • addon: a template for a full featured Kotti add-on, including
    • a content type class
    • add / edit forms and two selectable default views for the content type
    • fanstatic resources specific to these views
    • i18n infrastructure
    • test suite with 100% test coverage for the autogenerated code
  • theme: a simple template for a Kotti theme package.
  • widget: a template for a Kotti widget package, including
    • fanstatic resources
    • i18n infrastructure
    • test suite with 100% test coverage for the autogenerated code

Global settings

Some variables are used with every template. These should be added to the mr.bob user config in ~/.mrbob, e.g.:

[variables]

author.name = Andreas Kaiser
author.email = disko@binary-punks.com
author.github.user = disko

Creating a add-on package

To create a Kotti add-on run:

mrbob -O kotti_mycontent bobtemplates.kotti:addon

and answer the questions:

Welcome to mr.bob interactive mode. Before we generate directory structure,
some questions need to be answered.

Answer with a question mark to display help.
Value in square brackets at the end of the questions present default value
if there is no answer.


--> Name of the package: kotti_mycontent

--> Version of the package [0.1]:

--> License of the package [BSD]:

--> Class name for the content type: MyContent

--> Human readable name of the content type: My Content

--> Addable to [['Document', ]]:

Customize your content type class, the add/edit schema, views and templates. Optionally add some CSS, JS and images.

Setup the package and run the CSS/JS minifier:

python setup.py develop
python setup.py dev
python setup.py minify

Create the 18n files:

python setup.py extract_messages
python setup.py init_catalog -l de
python setup.py compile_catalog

Run the demo:

pserve development.ini

Point your browser to http://127.0.0.1:5000 and test Kotti with your new content type.

Creating a theme package

To create a Kotti theme run:

mrbob -O kotti_theme_spacelab bobtemplates.kotti:theme

and answer the questions:

Welcome to mr.bob interactive mode. Before we generate directory structure,
some questions need to be answered.

Answer with a question mark to display help.
Value in square brackets at the end of the questions present default value
if there is no answer.


--> Name of the package: kotti_theme_spacelab

--> Version of the package [0.1]:

--> License of the package [BSD]:

--> Name of the theme: Spacelab

--> Original URL of the wrapped theme: http://bootswatch.com/spacelab/

Add a Bootstrap CSS file:

cd kotti_theme_spacelab/kotti_theme_spacelab/static/css/
wget http://bootswatch.com/spacelab/bootstrap.css

Setup the package and run the CSS/JS minifier:

cd ../../../
python setup.py develop
python setup.py dev
python setup.py minify

Run the demo:

pserve development.ini

Point your browser to http://127.0.0.1:5000 and enjoy your themed Kotti site.

Creating a widget package

To create a Kotti widget run:

mrbob -O kotti_widget bobtemplates.kotti:widget

and answer the questions:

Welcome to mr.bob interactive mode. Before we generate directory structure,
some questions need to be answered.

Answer with a question mark to display help.
Value in square brackets at the end of the questions present default value
if there is no answer.


--> Name of the package: kotti_widget

--> Version of the package [0.1]:

--> License of the package [BSD]:

--> Name of the widget: fancywidget

Setup the package and run the CSS/JS minifier:

cd ../../../
python setup.py develop
python setup.py dev
python setup.py minify

Run the demo:

pserve development.ini

Point your browser to http://127.0.0.1:5000 and enjoy your Kotti widget.

About

mr.bob templates for Kotti development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published