Email rendering with Django

I’ve just pushed some changes to give the gtkEmailReader theming support.

gtkEmailReaderTheme1

gtkEmailReaderTheme2

Do those themes look familiar? They should. They look the same as the themes I made for the KDE themable email reader. In fact, the theme files themselves are almost identical.

The KDE email reader is themed using the Grantlee template system, which is itself a port to C++ of a python technology, the Django template system. The templates themes themselves are designed to be mostly source compatible between Grantlee and Django, so that made the choice of theming system for the gtkEmailReader an obvious one. The only changes I needed to make to use the Grantlee themes in gtkEmailReader was to change some variable names, and account for some differences in html rendering between QTextDocument and gtkhtml2.View.

In theory it would be possible to make some simple changes to the themes and really use the exact same templates for both applications, but it would be a pain to maintain as the applications and themes themselves change. This is still a good demo of the source template compatibility of Grantlee with Django though.

One Response to “Email rendering with Django”

  1. Candy Harris Says:

    Thanks for your post. I am new at development and this will help a lot.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: