mango-docs / 3=mango-0.3-released.text

date: 22 June 2010 time: 4:28am zone: Pacific/Auckland author: David Chambers

Mango 0.3 released

Commit 226 has been tagged "0.3". While this release adds a sprinkling of new functionality, it focuses on making Mango's core features more reliable.

Performance has been improved by a second caching layer which significantly reduces the need for (expensive) file reads and Markdown to HTML conversions.

Changes since 0.2

  • Posts and pages are now stored as Document objects. Previously, the naming of template context variables was rather haphazard; Mango now attaches all data pertaining to a particular document in a rational, orderly fashion.

    {% for document in documents %}
            <dd>{{ document.title }}</dd>
            <dt>Publication date</dt>
            <dd>{{ document.datetime }}</dd>
            <dd>{{ document.excerpt }}</dd>
    {% endfor %}
  • Improvements to comment notification e-mail make it possible to do many common tasks without leaving your inbox.

    Comment notification

  • Comment notification e-mail messages are now rendered by a Django template.

  • Replacements for << and >> have been removed. These were problematic due to their tendency to resemble HTML tags.

  • Mango's magic {{ filesize }} replacement is now more versatile. The new syntax is {{ filesize:'/path/to/file' }}. The file path must either be absolute or relative to the project directory.

    For example, here's the Mango logo in SVG format {{ filesize:'../../mango_static/images/mango.svg' }}.

    See this document's source to confirm that the file's size is being inserted dynamically. ;)

  • Mango now respects uppercase characters in category names (i.e. directory names). Since the names of these directories act as category labels, it's important to avoid category page titles such as "Html5" and "Css3"!

    Category slugs remain lowercase.

  • Mango now requires that DEFAULT_FROM_EMAIL be specified in the project settings file in order to send comment notification e-mail. This can simply be an e-mail address, but it's nicer to include a label as well.

    DEFAULT_FROM_EMAIL = 'Cautious Fireball <>'
  • Caching now occurs at the document level and at the "collection" level (a collection being a group of documents). Conversion of documents only occurs when necessary – unmodified documents are retrieved from the cache.

    Since Mango now provides every template a complete list of documents, using memcached is vitally important if you're worried about performance.

What next? {id=next}

One of Mango's endearing qualities is its lack of ambition. It's quite happy with its role in life – rendering content on the Web in an unobtrusive fashion.

There are a few more things that I'd like to implement. First is enabling commenters to subscribe to a thread's comments. It would be nice if the Disqus API exposed this feature; it doesn't, so I'm planning to store these lists in -- gasp! -- a database. SQLite databases don't count, though, do they? :P

The 404 and 500 templates need some love. I haven't worked out how to pass them context variables (at the moment Django's in complete control of this process).

Default browser styling doesn't appeal to everyone, so it'd be nice to have Mango ship with an elegant default theme at some point. :D