Mezzanine – a Django-based alternative to WordPress
Mezzanine is the most downloaded CMS/blogging tool for Django, recently surpassing Django CMS with over 115,000 downloads. Mezzanine provides a WordPress-like editing and admin experience with the power of Django under the hood for easy customizations. We use it for the main Appsembler.com website and love it!
In our continuing blog series about Django on PaaS, we use Mezzanine as the example Django project to deploy to all the PaaS providers.
No hassle testdrive of Mezzanine
If all you want to do is testdrive Mezzanine to see if you like it, you can get your own site to play with by using Appsembler’s 1-click testdrive service. Visit the Mezzanine info page and click on the FREE trial button to get a site in just a few minutes. And the best thing is that Stephen McDonald, the author of Mezzanine, gets paid when you buy a paid Mezzanine subscription plan, so that he can continue to make this amazing open source software.
Quickstart to get Mezzanine running locally
If you want to customize Mezzanine (which you’ll want to do to get the most out of it), you’ll need to install it locally and create a new project where you can start customizing it with your own theme. A future blog post will guide you through complete instructions on how to customize Mezzanine.
Below is a brief intro to getting Mezzanine set up locally for development. You should make a virtualenv into which we’ll install Mezzanine, rather than installing it in your global Python path. Note: if you don’t have virtualenv installed, follow these instructions to install it:
$ virtualenv mezzanine-venv New python executable in mezzanine-venv/bin/python Installing setuptools............done. Installing pip...............done.
Now activate the virtualenv:
$ . mezzanine-venv/bin/activate
The prompt will change to indicate that you’ve activated the virtualenv. Now install Mezzanine with pip:
(mezzanine-venv)$ pip install mezzanine Downloading/unpacking mezzanine ... Successfully installed mezzanine django filebrowser-safe grappelli-safe bleach pytz pillow html5lib Cleaning up...
Create a top level directory that will eventually host the config files for whichever PaaS provider you choose to deploy your site to. And use the mezzanine-project command to create a skeleton Mezzanine project:
(mezzanine-venv)$ mkdir paasbakeoff (mezzanine-venv)$ cd paasbakeoff (mezzanine-venv)$ mezzanine-project mywebsite (mezzanine-venv)$ ls mywebsite __init__.py local_settings.py settings.py deploy manage.py urls.py fabfile.py requirements
You should now run the syncdb command to initialize the database (it will use sqlite3 by default):
$ python manage.py syncdb
It might ask you to create a superuser, site record and import sample content. Just say yes to all the defaults.
Now you can start up Mezzanine with the usual Django runserver command:
$ python manage.py runserver Validating models... 0 errors found Django version 1.4.1, using settings 'mywebsite.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C.
Visit your Mezzanine site in your browser by going to http://127.0.0.1:8000/ and login to the admin by going tohttp://127.0.0.1:8000/admin. The default admin username is “admin” and password is “default”.
If you want to install any other Python packages for your Mezzanine project, you can add them to the requirements/project.txt and install them with:
$ pip install -r requirements/project.txt