[openstack-dev] [Change I30b127d6] Cheetah vs Jinja

Doug Hellmann doug.hellmann at dreamhost.com
Tue Jul 16 15:47:51 UTC 2013

On Tue, Jul 16, 2013 at 9:51 AM, Daniel P. Berrange <berrange at redhat.com>wrote:

> On Tue, Jul 16, 2013 at 09:41:55AM -0400, Solly Ross wrote:
> > (This email is with regards to https://review.openstack.org/#/c/36316/)
> >
> > Hello All,
> >
> > I have been implementing the Guru Meditation Report blueprint
> > (https://blueprints.launchpad.net/oslo/+spec/guru-meditation-report),
> > and the question of a templating engine was raised.  Currently, my
> > version of the code includes the Jinja2 templating engine
> > (http://jinja.pocoo.org/), which is modeled after the Django
> > templating engine (it was designed to be an implementation of the
> > Django templating engine without requiring the use of Django), which
> > is used in Horizon.  Apparently, the Cheetah templating engine
> > (http://www.cheetahtemplate.org/) is used in a couple places in Nova.
> >
> > IMO, the Jinja template language produces much more readable templates,
> > and I think is the better choice for inclusion in the Report framework.
> >  It also shares a common format with Django (making it slightly easier
> > to write for people coming from that area), and is also similar to
> > template engines for other languages. What does everyone else think?
> Repeating my comments from the review...
> I don't have an opinion on whether Jinja or Cheetah is a better
> choice, since I've essentially never used either of them (beyond
> deleting usage of ceetah from libvirt). I do, however, feel we
> should not needlessly use multiple different templating libraries
> across OpenStack. We should take care to standardize on one option
> that is suitable for all our needs. So if the consensus is that
> Jinja is better, then IMHO, there would need to be an blueprint
> + expected timeframe to port existing Ceetah usage to use Jinja.
> Regards,
> Daniel

The most current release of Cheetah is from 2010. I don't have a problem
adding a new dependency on a tool that is actively maintained, with a plan
to migrate off of the older tool to come later.

The Neutron team seems to want to use Mako (
https://review.openstack.org/#/c/37177/). Maybe we should pick one? Keep in
mind that we won't always be generating XML or HTML, so my first question
is "how well does Mako work for plain text?"


> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/:|
> |: http://libvirt.org              -o-             http://virt-manager.org:|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/:|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc:|
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130716/2aa170f7/attachment.html>

More information about the OpenStack-dev mailing list