pycms
A minimalist component based web content management system built upon CherryPy.
About
pycms is a minimalist component based web content management system built upon CherryPy.
Features:
-
All the goodies of Plone/Zope: Python instead of a PHP security mess, no MySQL can of worms, clean separation of code and content, runs nicely behind a web server / cache / load balancer.
-
Plain text storage of all site contents and settings in JSON files.
-
Effortless theming. Design an HTML page in your favourite editor, put in some
$placeholder_variables
, and upload. pycms cares for the rest. -
Small memory footprint. We're talking about 13 MB physical memory.
pycms is aiming at frustrated Plone users (and is being developed by one). Plone is an excellent CMS, but it has several severe shortcomings:
-
Plone/Zope is extremly difficult to manage, especially to update, when relying on unstable third-party plugins. Yes, one should not use them, yet we all do, since those extensions often add vital functionality.
-
Plone/Zope puts all contents into an object database. Accessing and changing the raw data, bypassing the CMS, is only possible via cumbersome command-line work. And we're not talking at all about manually fixing broken plugins in the database.
-
Theming Plone is a mess. To reproduce a preconceived design in Plone, long-winded CSS hacks along with a combination of interface settings and template customisations are required.
-
Plone/Zope has a comparatively large memory footprint. This can be an issue on slim virtual servers.
Plone is still a great system. Its security track record, internationalisation, and workflow tools are awesome. If you have a big site with complex requirements, go for it.
Prerequisites
Python > 3.0 http://www.python.org
CherryPy http://cherrypy.org/
Installation
There is no installation necessary. Simply run
python3 -m pycms.run
from the pycms folder.
Command Line Options
Usage: pycms.py [options]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-p PORT, --port=PORT The port to listen on. Default: 8000
-t THREADS, --threads=THREADS
The number of worker threads to start. Default: 10
-a, --autoreload Turn on CherryPy's auto reloading feature.
Templates
pycms templates are plain and valid HTML files, for the ease of editing.
<body>
and <link>
tags must be the first tags on a single line in the HTML
file.
pycms recognises special elements wrapped in HTML comments like this:
<!-- begin TYPE -->
... HTML, possibly with $variables ...
<!-- end TYPE -->
Where TYPE is one of
- node
- wrappednode
- linklist
- blognode
'wrappednode' supports the $content
placeholder variable.
Hard-Wired Rendering
BlogNode
<h2>
<a style="text-decoration:none;" href="URI">TITLE</a>
</h2>
<p style="font-size:80%">CREATOR, DATE</p>
<p style="font-style:italic;">ABSTRACT</p>
<div>CONTENT</div>
Wrap BlogNodes in a div
to control their rendering via CSS.
Linklist
<div class="linklist">
<ul>
<li><a href="URI">TITLE</a></li>
...
</ul>
</div>
General Page Footer
<p id="footer" style="font-size:8pt;text-align:center;">
Powered by <a href="http://florian-berger.de/en/software/pycms">pycms</a>
</p>
Documentation
To read the API documentation, open a shell / DOS window, navigate to the pycms directory, and run
pydoc pycms
You can create a HTML version using
pydoc -w pycms