Trac WikiTicketCalendar

WikiTicketCalendar is a Macro for the Trac Wiki/Ticketing System. This is based heavily on the WikiCalendarMacro by mgood. The purpose of this Macro is to show a paging, month view calendar of Trac tickets and milestones. The major modification is that this version shows tickets as well as milestones and is formatted to look more like a regular calendar.

For this to work your tickets need to have due dates assigned to them. Add the following to the ticket-custom section of your trac.ini file.

due_close = text
due_close.label = Due Date
due_close.value = MM/DD/YY

Next, rename the file attached to this post to and drop it into the wiki-macros folder of your trac install.

Once you have a few tickets with end dates assigned to them create a new wiki page to hold the calendar and add the following code:


That's it, you should now see a Calendar view that looks like the following screenshot. This has been tested with trac version 0.10 using postgress as the DB, other configurations may require modifications.

3/24/08 - Incorporated change from Alex to fix ordinal not in range issue
1/23/08 - Incorporated change from Vladislav Naumov for compatibility with newer versions of trac. Thanks!

AttachmentSize KB


Awesome macro!

just what i was looking for, thanks!

i made a wee little hack (i'm no python expert) so that i could use yyyy-mm-dd date formats instead.

could i submit configurable date format as a feature request? probably a piece of cake for a whiz like you. ;)

thanks much


Trac 0.11

I haven't personally tested this, but Mike Greer prepared a version of this that is reported to work with Trac 0.11b1. If anyone wants to test this you can download it from here. I probably won't be upgrading my trac server to 0.11 anytime soon so this is unofficial until I get a chance to confirm it works or I get a few comments saying it works for them.

Ordinal not in range

Thanks Alex, I've added that change to the current version linked on this page. This should fix the bottom comment as well.

Bug in Extension

Hi there,

let me first say, your extension in combination with WikiCalendar is exactly what I was searching for the last month. Many thanks for your work.
Nevertheless I experienced a bug in your extension when it comes to handling unicode chars in the ticket summary. The error message was something like

ascii (...) THE SUMMARY TEXT CONTAINING UNICODE CHARS (...) ordinal not in range(128)

I could simply fix this by changing the line "from cStringIO import StringIO" to "from StringIO import StringIO".

As I read ( the StringIO library is not that performant as cStringIO but it seemingly has a better unicode handling.

Alex (alex [at] goldstift [dot] de)


This seems a very nice macro!

But, I'm having problems with the installation in Trac v0.11 ..... can you explain how to install correctly?


on 0.11, the .py goes into

on 0.11, the .py goes into the plugins dir, not the wiki-macros.

I can`t compel to work

I have this error at the page with WikiTicketCaendar: ascii<div style="font-size: 9px; color: #000000" align="left">Тест (<a href="/trac/ticket/354" title='' target="_blank"&rt; - varya</a>)</div><p>5761ordinal not in range(128)
In my sustem there is one ticket wicth due_date. It`s 01/03/08. And the error I have at the page with GET-params "?month=3&year=2008".
Show me my mistake. Thank you!