Administrator’s Guide

Installation

Prerequisites

You need Python 2.7.

This is the usual way to install the prerequisites (but it may be better to install Pillow and TinyMCE through your operating system’s packages first):

mkvirtualenv [--system-site-packages] zadig
pip install -r requirements.txt

Installing a development/testing instance

You need to:

  1. Make copies of three files: zadig/settings/local-example.py, zadig/core/templates/base-example.html, and zadig/core/static/style-example.css; the copies should be in the same location as the originals and have the same name but without the -example part.
  2. Symlink the tinymce www directory (the one containing the tiny_mce.js file) to static/tinymce.
  3. If needed, edit your copied zadig/settings/local.py (although it will work as it is, using SQLite to create a database called testdb).
  4. Create the empty database, depending on the RDBMS you are using (you can skip this step for SQLite).
  5. Run python manage.py migrate.
  6. Run python manage.py createrootpage.
  7. Run python manage.py runserver.

After doing all that, point your browser to http://localhost:8000/.

Note

It is now a very good time to read the Concepts document.

Installing a production instance

There are the following differences from installing a development/testing instance:

  1. You should keep your configuration, custom template files, and custom CSS in a separate directory, such as /etc/zadig. In addition, you should store binary files in a separate directory, such as /var/local/lib/zadig, rather than in the storage subdirectory of the Zadig distribution, as it is configured by default to do.
  2. You should precompile the Zadig distribution Python files, since your web server (or your Django WSGI process, or whatever it is) should not have permission to write the .pyc or .pyo files in the Zadig distribution directory.
  3. You should use a RDBMS that is suitable for a production server. I use PostgreSQL_.
  4. You should deploy Django as described in Deploying Django, and configure your web server to serve the static files properly.

The details depend on your setup.

Settings reference

These settings are specific to Zadig; the Django settings are also applicable.

ZADIG_LANGUAGES

A tuple of (language_id, language_description) pairs, indicating the languages available in this installation. The first of these languages is the default language of the site. Example:

ZADIG_LANGUAGES = (
    ('en', 'English'),
    ('el', 'Ελληνικά'),
)
ZADIG_WORKFLOW_ID

This is the id of the Workflow object that is used in the site.