skip to navigation
skip to content

PyLucid 2.1.2

PyLucid CMS

about PyLucid

PyLucid is an Open Source web content management system written in Python using Django-CMS.

Since the v2.0 rewrite, PyLucid is more a alternative for djangocms-installer

The goal is to simplify the Django-CMS setup:

  1. Just run the bootstrap file to get a working virtualenv with everything installed.
  2. run pylucid_installer cli program to create a django-CMS page instance

You should not use PyLucid in production, until v2.x is used on ;)

Try, fork and contribute! ;)



The Pillow (PIL fork) doesn’t provide binaries for Linux. Make sure you have Python’s development libraries installed. e.g.:

$ sudo apt-get install python3-dev libjpeg-dev libfreetype6-dev

more info here:

You also need the development packages of libxml2 and libxslt for lxml

bootstrap PyLucid

# download bootstrap file:
/home/FooBar$ wget

# Create virtualenv with all needed packages:
/home/FooBar$ python3 ~/PyLucid_env

Now you have a virtual environment with all existing packages.

create page instance

You can create a new page instance with the pylucid_installer cli programm:

# Go into created virtualenv:
/home/FooBar$ cd ~/PyLucid_env

# activate the env:
~/PyLucid_env $ source bin/activate

# Create a page instance:
(PyLucid_env) ~/PyLucid_env $ pylucid_installer --dest=~/page_instance --name=MyCoolSite

# Go into created page instance
(PyLucid_env) ~/PyLucid_env $ cd ~/page_instance/

# Create cache tables
(PyLucid_env) ~/page_instance $ ./ createcachetable

# init database
(PyLucid_env) ~/page_instance $ ./ migrate

# Create a super user
(PyLucid_env) ~/page_instance $ ./ createsuperuser

# run developer server:
(PyLucid_env) ~/page_instance $ ./ runserver

Info: You can also create more than one page instance! All page instance will use the same environment.

optional packages

Before any pip install, go to your virtual env and activate it! e.g.:

/home/FooBar$ cd ~/PyLucid_env
~/PyLucid_env $ source bin/activate

MySQL DB API Driver:

(PyLucid_env) ~/PyLucid_env $ pip install mysqlclient

see also: Django database docs.

or use django-cymysql:

(PyLucid_env) ~/PyLucid_env $ pip install cymysql django-cymysql

and set ‘ENGINE’: ‘mysql_cymysql’

FastCGI wrapper for WSGI applications:

(PyLucid_env) ~/PyLucid_env $ pip install flipflop

see also:

DjangoCMS page permissions

The default permission settings is CMS_PERMISSION = True This settings enabled a fine permission system. To create a normal CMS user (and not a superuser) do the following steps:

  • create a superuser
  • create a user group and add add needed permission. e.g.: everything except models from the apps: admin, auth, content_types, reversion, session, sites
  • create a new user with staff rights and add the created user group
  • create a first page as superuser
  • from cms toolbar click on: Page / **Permissions …**
  • under Page permissions add the created user group

With this base setup you can add normal staff user which can create/edit/delete pages.

An easier way is to disable CMS_PERMISSION but then you will lost some functionality. e.g.:

  • create pages that are only visibly for some users.
  • deny editing pages for some users.

How to enable multisite support

With multisite support you can use one Django app to serve multiple domains.

It used the two projects:

Install the needed packages:

/home/FooBar$ cd ~/PyLucid_env
~/PyLucid_env $ source bin/activate
(PyLucid_env) ~/PyLucid_env $ pip install djangocms-multisite

Un-comment the multisite lines at the end of your page instance settings file.

How to start ‘design demo’

You can easy test existing settings.CMS_TEMPLATES with the included django app pylucid_design_demo

The Features:

  • preconfigurated: Start the django development server without any setting changes
  • use a temp. SQLite database
  • predefined user/password
  • precreated dummy pages
  • easy switch between all CMS_TEMPLATES via menu

To start the development server, do this:

/home/FooBar$ cd ~/PyLucid_env
~/PyLucid_env $ source bin/activate
(PyLucid_env) ~/PyLucid_env $ $ cd src/pylucid/
(PyLucid_env) ~/PyLucid_env/src/pylucid$ ./

It looks like this:


# go to your virtual env and activate it:
/home/FooBar$ cd ~/PyLucid_env
~/PyLucid_env $ source bin/activate
(PyLucid_env) ~/PyLucid_env $ cd src/pylucid/

# run the tests:
(PyLucid_env) ~/PyLucid_env/src/pylucid $ ./ test

PyLucid v1 migration

Use use the Multiple databases feature to migrate a old v1 installation: e.g.:

    'default': { # New, empty database for PyLucid v2 data
    'legacy': { # Your old database with existing PyLucid v1 data

You must activate some settings:

  • pylucid_migration, pylucid_todo in INSTALLED_APPS
  • Activate a ‘legacy’ named second database with the old PyLucid v1 data

(All parts exists in the example project settings ;) )

commands for migration, e.g.:

# create missing models (e.g. todo app)
(PyLucid_env) ~/page_instance $ ./ migrate

# migrate old pages to django-cms:
(PyLucid_env) ~/page_instance $ ./ migrate_pylucid --inline_script --sites=ALL

# migrate old blog entries to djangocms-blog:
(PyLucid_env) ~/page_instance $ ./ migrate_blog --inline_script --sites=ALL

# export existing designs into filesystem
(PyLucid_env) ~/page_instance $ ./ export_designs

NOTE: With the argument –inline_script all <script> areas would be migrate to a html-markup entry. So all <script> areas are active after migration. Without –inline_script all <script> areas will be result in escaped text.

All unsupported lucidTag entries will be migrate to the “ToDoPlugin”. SO the origin code is not away, but will be not visible for anonymous users.

upgrade the environment

# go to your virtual env and activate it:
/home/FooBar$ cd ~/PyLucid_env
~/PyLucid_env $ source bin/activate

# Upgrade pip:
(PyLucid_env) ~/PyLucid_env $ pip install --upgrade pip

# Update PyLucid
(PyLucid_env) ~/PyLucid_env $ cd src/pylucid/
(PyLucid_env) ~/PyLucid_env/src/pylucid/ $ git pull

# Upgrade all packages:
(PyLucid_env) ~/PyLucid_env/src/pylucid/ $  pip install --upgrade -r requirements/normal_installation.txt



  • migrate User Profile data
  • migrate the information pagetree.permitViewGroup, pagemeta.permitViewGroup and pagetree.permitEditGroup

Compatible Matrix

PyLucid Django-CMS Django Python
v2.1 v3.3 v1.8 LTS 3.4, 3.5
v2.0 v3.2 v1.8 LTS 3.4, 3.5
v1.6 2.6, 2.7

Release History

(Not all old releases are listed.)

For older PyLucid history, look at:

File Type Py Version Uploaded on Size
PyLucid-2.1.2-py2.py3-none-any.whl (md5) Python Wheel py2.py3 2016-09-12 497KB
PyLucid-2.1.2-py3.5.egg (md5) Python Egg 3.5 2016-09-12 487KB
PyLucid-2.1.2.tar.gz (md5) Source 2016-09-12 453KB