Mezzanine Documentation Release 4.3.1
Total Page:16
File Type:pdf, Size:1020Kb
Mezzanine Documentation Release 4.3.1 Stephen McDonald Sep 17, 2018 Contents 1 Table Of Contents 3 1.1 Overview.................................................3 1.2 Content Architecture........................................... 17 1.3 Model Customization.......................................... 25 1.4 Admin Customization.......................................... 27 1.5 Multi-Lingual Sites............................................ 31 1.6 Utilities.................................................. 34 1.7 Model Graph............................................... 39 1.8 In-line Editing.............................................. 40 1.9 Caching Strategy............................................. 42 1.10 Multi-Tenancy.............................................. 43 1.11 Deployment............................................... 45 1.12 Frequently Asked Questions....................................... 48 1.13 Public User Accounts.......................................... 53 1.14 Search Engine.............................................. 54 1.15 Configuration............................................... 58 1.16 Importing External Blogs........................................ 72 1.17 Twitter Integration............................................ 75 1.18 Packages................................................. 76 1.19 Colophon................................................. 108 Python Module Index 217 i ii Mezzanine Documentation, Release 4.3.1 Welcome to the Mezzanine project. To learn more about Mezzanine please read the Overview which contains a feature list, installation guide and other general information. To get an idea of the types of sites possible with Mezzanine, have a look at the gallery of sites powered by Mezzanine. Note: A working knowledge of Django is required to work with Mezzanine and the documentation assumes as much. If you’re new to Django, you’ll need to work through the Django tutorial before being able to understand the concepts used throughout the Mezzanine documentation. A mantra for working with Mezzanine: Mezzanine Is Just Django - Ken Bolton, Mezzanine core team member. Front-end developers might be interested in Mezzanine’s ability for content authors to edit content directly within a page while viewing it on the website. You can read about this and how to implement this feature within templates under In-line Editing. Back-end developers can get a better technical overview of how content is managed and how to customize Mezzanine in general by reading about Mezzanine’s Content Architecture which describes the main components and how to extend them with your own custom content types, or by reading about Model Customization for implementing more low-level customizations as required. There is also a section on the Admin Customization provided by Mezzanine, as well as a Model Graph depicting the relationships between all the models. System administrators can find out about some of the production requirements and operations in the Deployment and Caching Strategy sections. Further reading includes Frequently Asked Questions, Utilities, a section on Public User Accounts, support for Multi- Lingual Sites, information about Mezzanine’s Search Engine, and a section on Mezzanine’s Configuration which outlines the various settings for configuring Mezzanine. Lastly, you can learn about Importing External Blogs into Mezzanine, Twitter Integration, or just browse the auto-generated docs for each of Mezzanine’s Packages. Contents 1 Mezzanine Documentation, Release 4.3.1 2 Contents CHAPTER 1 Table Of Contents Created by Stephen McDonald 1.1 Overview Mezzanine is a powerful, consistent, and flexible content management platform. Built using the Django framework, Mezzanine provides a simple yet highly extensible architecture that encourages diving in and hacking on the code. Mezzanine is BSD licensed and supported by a diverse and active community. In some ways, Mezzanine resembles tools such as Wordpress, providing an intuitive interface for managing pages, blog posts, form data, store products, and other types of content. But Mezzanine is also different. Unlike many other platforms that make extensive use of modules or reusable applications, Mezzanine provides most of its functionality by default. This approach yields a more integrated and efficient platform. Visit the Mezzanine project page to see some of the great sites people have built using Mezzanine. 1.1.1 Features In addition to the usual features provided by Django such as MVC architecture, ORM, templating, caching and an automatic admin interface, Mezzanine provides the following: • Hierarchical page navigation • Save as draft and preview on site • Scheduled publishing • Drag-and-drop page ordering • WYSIWYG editing • In-line page editing • Drag-and-drop HTML5 forms builder with CSV export 3 Mezzanine Documentation, Release 4.3.1 • SEO friendly URLs and meta data • Ecommerce / Shopping cart module (Cartridge) • Configurable dashboard widgets • Blog engine • Tagging • Free Themes, and a Premium Themes Marketplace • User accounts and profiles with email verification • Translated to over 35 languages • Sharing via Facebook or Twitter • Multi-lingual sites • Custom templates per page or blog post • Twitter Bootstrap integration • API for custom content types • Search engine and API • Seamless integration with third-party Django apps • One step migration from other blogging engines • Automated production provisioning and deployments • Disqus integration, or built-in threaded comments • Gravatar integration • Google Analytics integration • Twitter feed integration • bit.ly integration • Akismet spam filtering • Built-in test suite • JVM compatible (via Jython) The Mezzanine admin dashboard: 4 Chapter 1. Table Of Contents Mezzanine Documentation, Release 4.3.1 1.1.2 Support To report a security issue, please send an email privately to [email protected]. This gives us a chance to fix the issue and create an official release prior to the issue being made public. For all other Mezzanine support, the primary channel is the mezzanine-users mailing list. Questions, comments, issues, feature requests, and all other related discussions should take place here. If you’re certain you’ve come across a bug, then please use the GitHub issue tracker, however it’s crucial that enough information is provided to reproduce the bug, ideally with a small code sample repo we can simply fork, run, and see the issue with. Other useful information includes things such as the Python stack trace generated by error pages, as well as other aspects of the development environment used, such as operating system, database, and Python version. If you’re not sure you’ve found a reproducible bug, then please try the mailing list first. Finally, feel free to drop by the #mezzanine IRC channel on Freenode, for a chat! Lastly, communications in all Mezzanine spaces are expected to conform to the Django Code of Conduct. 1.1.3 Contributing Mezzanine is an open source project managed using both the Git and Mercurial version control systems. These repositories are hosted on both GitHub and Bitbucket respectively, so contributing is as easy as forking the project on either of these sites and committing back your enhancements. 1.1.4 Donating If you would like to make a donation to continue development of Mezzanine, you can do so via the Mezzanine Project website. 1.1. Overview 5 Mezzanine Documentation, Release 4.3.1 1.1.5 Quotes • “I’m enjoying working with Mezzanine, it’s good work” - Van Lindberg, Python Software Foundation chairman • “Mezzanine looks like it may be Django’s killer app” - Antonio Rodriguez, ex CTO of Hewlett Packard, founder of Tabblo • “Mezzanine looks pretty interesting, tempting to get me off Wordpress” - Jesse Noller, Python core contributor, Python Software Foundation board member • “I think I’m your newest fan. Love these frameworks” - Emile Petrone, integrations engineer at Urban Airship • “Mezzanine is amazing” - Audrey Roy, founder of PyLadies and Django Packages • “Mezzanine convinced me to switch from the Ruby world over to Python” - Michael Delaney, developer • “Like Linux and Python, Mezzanine just feels right” - Phil Hughes, Linux For Dummies author, The Linux Journal columnist • “Impressed with Mezzanine so far” - Brad Montgomery, founder of Work For Pie • “From the moment I installed Mezzanine, I have been delighted, both with the initial experience and the com- munity involved in its development” - John Campbell, founder of Head3 Interactive • “You need to check out the open source project Mezzanine. In one word: Elegant” - Nick Hagianis, developer 1.1.6 Installation The easiest method is to install directly from pypi using pip by running the command below, which will also install the required dependencies mentioned above: $ pip install mezzanine If you prefer, you can download Mezzanine and install it directly from source: $ python setup.py install Once installed, the command mezzanine-project can be used to create a new Mezzanine project in similar fashion to django-admin.py: $ mezzanine-project project_name $ cd project_name $ python manage.py createdb --noinput $ python manage.py runserver Note: The createdb command is a shortcut for using Django’s migrate command, which will also install some demo content, such as a contact form, image gallery, and more. If you’d like to omit this step, use the --nodata option with createdb. You should then be able to browse to http://127.0.0.1:8000/admin/ and log in using the default account (username: admin, password: default).