Setting up a django and mezzanine development environment on Mac OS X

I’m currently working with django and mezzanine. Django is a web framework using python language and mezzanine is a CMS based on Django.

I chose Django for the clarity of the python language. As a computer scientist there is nothing less appealing than using PHP which I find as deviant by initial design.

After looking for a CMS based on Django, I chose Mezzanine because it is really easy to get used to. It’s well designed and extremely well integrated into Django. Moreover, the installation just worked the way I expected it…

So let’s see how I did set up my development environment on a Mac.

To simplify things, I use homebrew to install additional software on my mac.

Installing python3, pip

Mac OS X yosemite comes bundled with python 2.7. I usually try to use the latest versions of languages, so I wanted to install python3. Using homebrew, pip will come installed automatically also.

brew install python3
pip install virtualenv

This is enough, even if your project do require more python package, I’d recommend using a virtual-env from the beginning.

Installing mezzanine in a virtual env

That’s quite easy. Go into your development directory and use the following commands.

virtualenv mezzanine-env
source mezzanine-env/bin/activate
pip install mezzanine
brew install libjpeg
mezzanine-project mezzanine-tutorial
cd mezzanine-tutorial/
python manage.py createdb --noinput
python manage.py runserver

This will setup a virtual env for your project and install mezzanine. libjpeg has been installed as it seems to be required by some packages.

Then, the commands create an startup mezzanine project and runs it. Now you should be able to connect to localhost:8000 and begin working with a simple web site.

I’m currently working with django and mezzanine. Django is a web framework using python language and mezzanine is a CMS based on Django.

I chose Django for the clarity of the python language. As a computer scientist there is nothing less appealing than using PHP which I find as deviant by initial design.

After looking for a CMS based on Django, I chose Mezzanine because it is really easy to get used to. It’s well designed and extremely well integrated into Django. Moreover, the installation just worked the way I expected it…

So let’s see how I did set up my development environment on a Mac.

To simplify things, I use homebrew to install additional software on my mac.

Installing python3, pip

Mac OS X yosemite comes bundled with python 2.7. I usually try to use the latest versions of languages, so I wanted to install python3. Using homebrew, pip will come installed automatically also.

brew install python3
pip install virtualenv

This is enough, even if your project do require more python package, I’d recommend using a virtual-env from the beginning.

Installing mezzanine in a virtual env

That’s quite easy. Go into your development directory and use the following commands.

virtualenv mezzanine-env
source mezzanine-env/bin/activate
pip install mezzanine
brew install libjpeg
mezzanine-project mezzanine-tutorial
cd mezzanine-tutorial/
python manage.py createdb --noinput
python manage.py runserver

This will setup a virtual env for your project and install mezzanine. libjpeg has been installed as it seems to be required by some packages.

Then, the commands create an startup mezzanine project and runs it. Now you should be able to connect to localhost:8000 and begin working with a simple web site.