May 2, 2020

Setting up Mezzanine CMS with Django 2

The problem:

Mezzanine CMS currently works with Django 1.1x something, by default, but does not work with Django 2 yet.

(See https://github.com/stephenmcd/mezzanine/issues/1749 )

From the track record for support by Mezzanine, this seems likely to get fixed in the future.

A fix for the problem is already available from the fork https://github.com/stephenmcd/mezzanine.git

( See https://groups.google.com/forum/embed/#!topic/mezzanine-users/sI2dgMP2r_Y )
An additional problem exists in this fork, where the saving of new blog entries results in an error

A work around for the error is also suggested in

https://github.com/stephenmcd/mezzanine/issues/1899

The issue has been fixed after forking from https://github.com/stephenmcd/mezzanine.git

and is available on https://github.com/sanketdiwale/mezzanine.git

Since it has not been confirmed that this is an acceptable workaround for production environments, the corrected and working version is left on the fork for now. The project can be up and running as follows.

The solution:

First install Django 2.2

pip install Django

Then install Mezzanine from the git repo (this will downgrade the django to version 2.0.9 or something similar

pip install git+https://github.com/sanketdiwale/mezzanine.git
pip install git+https://github.com/stephenmcd/filebrowser-safe.git

Now create a new project

mezzanine-project myproject

Create a database and add the superuser to get started with the admin

python manage.py createdb

Run the server locally to test

python manage.py runserver