This quickstart assumes you wish to use the following packages:

  • Widgy Mezzanine
  • Page Builder
  • Form Builder

Install the Widgy package:

pip install django-widgy[all]

Add Mezzanine apps to INSTALLED_APPS in settings.py:


add Widgy to INSTALLED_APPS:


add required Widgy apps to INSTALLED_APPS:


django.contrib.admin should be installed after Mezzanine and Widgy, so move it under them in INSTALLED_APPS.

add Mezzanine middleware to MIDDLEWARE_CLASSES:


Mezzanine settings:

# settings.py
PACKAGE_NAME_FILEBROWSER = "filebrowser_safe"
PACKAGE_NAME_GRAPPELLI = "grappelli_safe"

If you want mezzanine to use WidgyPage as the default page, you can add the following line to settings.py:


add Mezzanine’s context processors. If you don’t already have TEMPLATE_CONTEXT_PROCESSORS in your settings file, you should copy the default before adding Mezzanine’s:

    # Defaults
    # Mezzanine

make a Widgy site and set it in settings:

# demo/widgy_site.py
from widgy.site import WidgySite

class WidgySite(WidgySite):

site = WidgySite()

# settings.py
WIDGY_MEZZANINE_SITE = 'demo.widgy_site.site'

Configure django-compressor:

# settings.py


    ('text/x-scss', 'django_pyscss.compressor.DjangoScssFilter'),


Widgy requires that django-compressor be configured with a precompiler for text/x-scss. Widgy uses the django-pyscss package for easily integrating the pyScss library with Django.


If you are using a version of Django older than 1.7, you will need use South 1.0 or set SOUTH_MIGRATION_MODULES.

Then run the following command:

$ python manage.py migrate


If you are on a version of Django older than 1.7, you will need to run the following command as well:

$ python manage.py syncdb

add urls:

# urls.py
from django.conf.urls import patterns, include, url
from demo.widgy_site import site as widgy_site

urlpatterns = patterns('',
    # ...
    # widgy admin
    url(r'^admin/widgy/', include(widgy_site.urls)),
    # widgy frontend
    url(r'^widgy/', include('widgy.contrib.widgy_mezzanine.urls')),
    url(r'^', include('mezzanine.urls')),

Make sure you have a url pattern named home or the admin templates will not work right.

If you are using GenericTemplateFinderMiddleware, use the one from fusionbox.mezzanine.middleware. It has been patched to work with Mezzanine.

How to edit home page

  1. Add the homepage to your urls.py:

    url(r'^$', 'mezzanine.pages.views.page', {'slug': '/'}, name='home'),

    Note: it must be a named URL, with the name ‘home’

  2. Make a page with the slug / and publish it.

  3. Make a template called pages/index.html and put:

    {% extends "pages/widgypage.html" %}

    Note: If you don’t do this you will likely get the following error:

    AttributeError: 'Settings' object has no attribute 'FORMS_EXTRA_FIELDS'

    This is caused by Mezzanine falling back its own template pages/index.html which tries to provide the inline editing feature, which requires mezzanine.forms to be installed.

Admin center


# settings.py
    ('Widgy', (
        ('Review queue', 'review_queue.ReviewedVersionCommit'),
        ('File manager', 'filer.Folder'),

urlconf include

urlconf_include is an optional application that allows you to install urlpatterns in the Mezzanine page tree. To use it, put it in INSTALLED_APPS,:


then add the urlconf_include middleware,:


then set URLCONF_INCLUDE_CHOICES to a list of allowed urlpatterns. For example:

    ('blog.urls', 'Blog'),

Adding Widgy to Mezzanine

If you are adding widgy to an existing mezzanine site, there are some additional considerations.

If you have not done so already, add the root directory of your mezzanine install to INSTALLED_APPS.

Also, take care when setting the WIDGY_MEZZANINE_SITE variable in your settings.py file. Because mezzanine is using an old Django directory structure, it uses your root directory as your project file:

# Use:
WIDGY_MEZZANINE_SITE = 'myproject.demo.widgy_site.site'
# Not:
WIDGY_MEZZANINE_SITE = 'demo.widgy_site.site'

Common Customizations

If you only have WidgyPages, you can choose to unregister the Mezzanine provided RichTextPage. Simply add this to an admin.py file in your directory and add this code:

from django.contrib import admin

from mezzanine.pages.models import RichTextPage