Package: mezzanine-meze
Meze addsSphinxflavor toMezzanine. You can write your blog posts and
pages inreStructuredTextand get them converted into HTML via Sphinx.Usage ExamplesSee a number of usage examples at:http://ahmetbakan.com/blog/category/meze/RequirementsSphinxis required to convert reStructuredText source.InstallationYou can useeasy_installorpip:easy_install -U mezzanine-meze
pip install mezzanine-mezeor download package fromhttps://pypi.python.org/pypi/mezzanine-mezeand install usingsetup.py.Quick startMake the following changes in your projectsettings.pyfile:Add “meze” toINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'meze',
)Injectsourceandconvertfields tomezzanine.blog.models.BlogPostandmezzanine.pages.models.RichTextPage.sourcemodels:help_text = ("Source in reStructuredText format will be converted to "
             "HTML and result will replace content field.")
EXTRA_MODEL_FIELDS = (
    # Enable Meze for blog posts
    ("mezzanine.blog.models.BlogPost.source",
     "TextField", (), {"blank": True, "help_text": help_text}),
    ("mezzanine.blog.models.BlogPost.convert",
     "BooleanField", ("Convert source",), {"default": True}),
    # Enable Meze for rich text pages
    ("mezzanine.pages.models.RichTextPage.source",
     "TextField", (), {"blank": True, "help_text": help_text}),
    ("mezzanine.pages.models.RichTextPage.convert",
     "BooleanField", ("Convert source",), {"default": True}),
)
del help_textIf you have started using Meze after creating database, you may need to
make a migration. See field injectioncaveatsin Mezzanine documentation.Updatesettings.pyfile.AddMEZE_SETTINGS:MEZE_SETTINGS = {
    'workdir': os.path.join(PROJECT_ROOT, 'meze_workdir'),
}Default values are shown. You will need write access toworkdir.Addconfigurationoptions for Sphinx:SPHINX_CONF = """
project = u''
copyright = u''
version = '0'
release = '0'
master_doc = 'index'
pygments_style = 'sphinx'
html_theme = 'default'
html_sidebars = {'**': []}
html_domain_indices = False
html_use_index = False
html_show_sourcelink = False
html_add_permalinks = None
source_suffix = '.rst'
intersphinx_mapping = {'python': ('http://docs.python.org/', None)}
extlinks = {'wiki': ('http://en.wikipedia.org/wiki/%s', ''),}
extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.extlinks']
"""This file is written to Mezeworkdir.Sphinx is usingPygmentsfor syntax highlighting, so you will need to
addpygments.cssfile to your template:{% compress css %}
...
<link rel="stylesheet" href="{% static "meze/css/meze.css" %}">
<link rel="stylesheet" href="{% static "meze/css/pygments.css" %}">
...If you are writing Python snippets, you can also addcopybutton.jsfile, to enable a copy friendly display option for code:{% compress js %}
...
<script src="{% static "meze/js/copybutton.js" %}"></script>
...How does it work?Meze starts aSphinxproject inworkdirby creating a simple
configuration file (conf.py).reStructuredText files are written intoworkdir, HTML files are built
using Sphinx, and content of HTML files are stored in the database.Source codehttps://github.com/abakan/mezzanine-mezeChangesv0.3 (Jan 10, 2014)Moved static files tomezefolder.Added static files tosetup.py.v0.2.2 (Oct 11, 2013)Searching images in bothSTATIC_ROOTandMEDIA_ROOTfolders.Improved revising image sources in HTML to avoid exceptions when
an image file is not found.v0.2.1 (July 17, 2013)Fixed a bug inMezeclass that prevented changes in Sphinx configuration
to take place.v0.2 (July 12, 2013)Improved handling of image files.v0.1 (July 11, 2013)First release.