Skip to main content

PyLucid CMS

Project description

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:

  • Just run the bootstrap file to get a working virtualenv with everything installed.

  • 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 pylucid.org ;)

Try, fork and contribute! ;)

Coverage Status on coveralls.io

coveralls.io/r/jedie/PyLucid

Build Status on travis-ci.org

travis-ci.org/jedie/PyLucid

Requirements Status on requires.io

requires.io/github/jedie/PyLucid/requirements/

install

prepare

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: https://pillow.readthedocs.org/en/latest/installation.html

bootstrap PyLucid

# download bootstrap file:
/home/FooBar$ wget https://github.com/jedie/PyLucid/raw/develop/pylucid-boot.py

# Create virtualenv with all needed packages:
/home/FooBar$ python3 pylucid-boot.py ~/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/

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

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

# run developer server:
(PyLucid_env) ~/page_instance $ ./manage.py 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.

FastCGI wrapper for WSGI applications:

(PyLucid_env) ~/PyLucid_env $ pip install flipflop

see also: https://pypi.python.org/pypi/flipflop

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.

unittests

# 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 $ ./setup.py test

PyLucid v1 migration

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

DATABASES = {
    '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

  • Activate DATABASE_ROUTERS

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

commands for migration, e.g.:

# migrate old pages to django-cms:
(PyLucid_env) ~/page_instance $ ./manage.py migrate_pylucid --inline_script

# migrate old blog entries to djangocms-blog:
(PyLucid_env) ~/page_instance $ ./manage.py migrate_blog --inline_script

# export existing designs into filesystem
(PyLucid_env) ~/page_instance $ ./manage.py 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

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

dev info

Currently the base files are a mix of:

TODO

migration:

  • migrate User Profile data

  • migrate the information pagetree.permitViewGroup, pagemeta.permitViewGroup and pagetree.permitEditGroup

Release History

(Not all old releases are listed.)

For older PyLucid history, look at:

donation

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyLucid-2.0.0b0.tar.gz (458.2 kB view details)

Uploaded Source

Built Distributions

PyLucid-2.0.0b0-py3.5.egg (494.5 kB view details)

Uploaded Source

PyLucid-2.0.0b0-py2.py3-none-any.whl (503.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file PyLucid-2.0.0b0.tar.gz.

File metadata

  • Download URL: PyLucid-2.0.0b0.tar.gz
  • Upload date:
  • Size: 458.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyLucid-2.0.0b0.tar.gz
Algorithm Hash digest
SHA256 8b2d00dc3b2c7d1cc78b36b2822282a672b9bae1e4fcea6432547389a8ab3f3c
MD5 486b2201f81fbe0a44db9eede512864b
BLAKE2b-256 c9a9e1ad8afc741a9fbe730460aa719ba1ee08eca49f99692a7ff4ce5e32e41c

See more details on using hashes here.

File details

Details for the file PyLucid-2.0.0b0-py3.5.egg.

File metadata

File hashes

Hashes for PyLucid-2.0.0b0-py3.5.egg
Algorithm Hash digest
SHA256 5c349a46ec6c860cdc76f20a81684cb0b55def34f9a75440bbc5c3abd394e569
MD5 336448e23d5ea63cc15f662f4e9068e3
BLAKE2b-256 4a3e7714b5ec1a9c1405aaf54e3380bd2edcee02fa9f42bdb7ae559a93555d8a

See more details on using hashes here.

File details

Details for the file PyLucid-2.0.0b0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for PyLucid-2.0.0b0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3dd6889aaf99a8f67feade12dd70f35d9b9d00a69e457145453aada21a02f3ff
MD5 44100021faeea518c24ee1f1dbb01f75
BLAKE2b-256 2e1dc748166cf9302b8a6812beb08f1882b7bea35aef3bc088139f652dc464cd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page