ACRCms installation

Preliminary steps

System Packages Installation

For Ubuntu/Debian systems:

$ sudo apt-get install build-essential python-dev python-setuptools python-virtualenv

For Fedora systems:

$ su -c 'yum install gcc sqlite-devel python-virtualenv'

Standard installation

The standard installation pattern provides a full ACRCms instance

Environment setup

Install the environment:

$ virtualenv --no-site-packages acrenv
$ cd acrenv/
$ source bin/activate
(acrenv)$ easy_install -i tg.devtools
(acrenv)$ hg clone ssh://
(acrenv)$ cd acrcms/acr_cms/
(acrenv)$ python develop
(acrenv)$ paster setup-app development.ini

Serve the contents:

(acrenv)$ paster serve development.ini --reload

Enable libacr functionalities in any TG project

Instead of creating a brand new project, you can add the cms funcionalities provided by libacr in any TurboGears2 project.

Install libacr:

(yourenv)$ easy_install libacr

Enable libacr in your project.

Add this lines to yourproject/lib/

import libacr
from libacr.helpers import *

icons = {}

Add this lines to yourproject/lib/

from libacr.lib import *

#[in the __call__ method]

Add this lines to yourproject/config/

    from tgext.pluggable import plug
    base_config.acr_pluggable_enabled = True
except ImportError:
    base_config.acr_pluggable_enabled = False

if base_config.acr_pluggable_enabled:
        plug(base_config, 'photos')
    except ImportError:

        plug(base_config, 'smallpress')
    except ImportError:

Add this line to yourproject/model/

from libacr.model import init_acr_model
Content, ContentData, Tag, Page, Slice, View, Comment = init_acr_model(DBSession, DeclarativeBase, User, Group)

Add this line to yourproject/controllers/

from libacr.controllers.cms import AcrRootController

#[in the RootController class]
acr = AcrRootController()

Deploy ACRCms on Red Hat’s OpenShift PaaS

Get up and running with a ACRCms instance on OpenShift using acrcms-openshift-quickstart. It automatically handles creating a Python virtualenv, populating a MySQL database, and deploying the cms to the cloud.


  • Completely free, thanks to Red Hat’s OpenShift Express
  • MySQL database automatically setup
  • Dynamic database configuration at runtime. No passwords stored in your configs.
  • Automatic deployment upon git push
  • No need to think about servers, let alone apache/mod_wsgi configuration

How To

rhc domain create -n <yournamespace> -l
  • Deploy the cms:
rhc app create -a ACRCms -t python-2.6 -l
rhc app cartridge add -a ACRCms -c mysql-5.1 -l
cd ACRCms
git remote add upstream -m master
git pull -s recursive -X theirs upstream master
git push

Monitoring your logs

rhc-tail-files -a ACRCms -l