プロジェクトの管理ツールとしてTrac0.11をインストールしてみた。0.10まではPluginとしてインストールしていたWebAdminが0.11からは標準で付いてる。
メニューはこんな感じ。
ユーザ管理まではできないので、別途AccountManagerプラグインを追加する必要がある。
http://packages.debian.org/ja/source/sid/trac-accountmanager
後は、Tracのフィールドにカレンダポップアップやアイコンレイアウト、選択項目の補完など、レイアウト機能を強化するDecoratorPluginを追加。
http://sourceforge.jp/projects/shibuya-trac/wiki/plugins%2FDecoratorPlugin
まず、インストール
easy_install http://svn.sourceforge.jp/svnroot/shibuya-trac/plugins/decoratorplugin/trunk
続いて、trac.iniを編集
[components] decorator.* = enables [decorator] calendar_fields=カレンダーを配置したいコンポーネントのIDをカンマ区切りで定義
で利用可能になる。
続いて、GanttCalendarPlugin。
チケットにカスタム項目として開始日、終了日を追加し、それをカレンダーとガントチャートに視覚的に表示可能にするプラグイン。インストール後必要となるカスタムチケットをtrac.iniに追加。
[ticket-custom] due_assign = text due_assign.label = 開始日 due_assign.order = 1 due_close= text due_close.label = 終了日 due_close.order = 2 complete= text complete.label = 進捗率(%) complete.order = 3
で、ページを更新すると、
Traceback (most recent call last): File "/home/hoge/install/lib/python2.5/site-packages/Trac-0.11.ja1-py2.5.egg/trac/web/api.py", line 339, in send_error 'text/html') File "/home/hoge/install/lib/python2.5/site-packages/Trac-0.11.ja1-py2.5.egg/trac/web/chrome.py", line 726, in render_template stream.render(method, doctype=doctype, out=buffer) File "/home/hoge/install/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py", line 179, in render return encode(generator, method=method, encoding=encoding, out=out) File "/home/hoge/install/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py", line 61, in encode for chunk in iterator: File "/home/hoge/install/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py", line 311, in __call__ for kind, data, pos in stream: File "/home/hoge/install/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py", line 753, in __call__ for kind, data, pos in stream: File "/home/hoge/install/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py", line 592, in __call__ for kind, data, pos in stream: File "/home/hoge/install/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py", line 710, in __call__ text = escape(pop_text(), quotes=False) File "/home/hoge/install/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py", line 494, in escape text = unicode(text).replace('&', '&') \ UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128)
といったUnicodeDecodeErrorが発生する。Trac0.11からテンプレートエンジンがClearSilverからGenshiに変わったがそいつがエラー吐いてるのか?Genshiバージョン変えてみても変わらずorz...
2010/04/28 追記
コメントに記載頂いたとおり原因は、pythonのデフォルトエンコードがasciiになっているのが問題でした。
このエンコードを変更するには、sitecustomize.pyに以下のように記載しておきます。
import sys sys.setdefaultencoding('utf-8')