<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>サイキョウライン &#187; TurboGears</title>
	<atom:link href="http://saikyoline.jp/weblog/category/turbogears/feed" rel="self" type="application/rss+xml" />
	<link>http://saikyoline.jp/weblog</link>
	<description>コンピュータに関係あることとか、ないこととか。</description>
	<lastBuildDate>Tue, 13 Jul 2010 15:04:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>TurboGearsのDVD。</title>
		<link>http://saikyoline.jp/weblog/2006/05/26/234730.html</link>
		<comments>http://saikyoline.jp/weblog/2006/05/26/234730.html#comments</comments>
		<pubDate>Fri, 26 May 2006 14:47:30 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=269</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<blockquote cite="http://www.turbogears.org/ultimate.html" title="TurboGears Ultimate DVD"><p><a href="http://www.turbogears.org/ultimate.html">TurboGears Ultimate DVD</a></p>
<p>The TurboGears Ultimate DVD is a data DVD from Kevin Dangoor, the founder of the TurboGears project. My idea was to put together a DVD that offers some of the feel of pair programming with me.</p></blockquote>
<p>ダウンロードできるWikiチュートリアルの最新版（高画質）やTurboGearsの構造説明など2時間超のムービーだとか、ドキュメント一式だとかが入っているらしい。<br/><br />
DVDに自分の名前を入れてくれたり、TurboGearsとかかれたTooｌBoxが付いてくるメニューがあったり、デスクに飾れ的なおもちゃも。6月1日まで予約キャンペーンとのこと、興味があったので注文してみました。<br/><br />
<br/><br />
で、</p>
<blockquote><p>TurboGears 1.0 has a lot of features to cover. The TurboGears Ultimate DVD is not a replacement for <strong>the book-in-progress &#8220;Rapid Web Applications with TurboGears&#8221;</strong>. The book covers the user-level APIs in detail, but does not talk about how TurboGears works on the inside.</p></blockquote>
<p>本が出る、と。</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2006/05/26/234730.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>外部キー付きのテーブルがdropできない。その２。</title>
		<link>http://saikyoline.jp/weblog/2006/05/19/234807.html</link>
		<comments>http://saikyoline.jp/weblog/2006/05/19/234807.html#comments</comments>
		<pubDate>Fri, 19 May 2006 14:48:07 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=264</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>いぜんSQLObjectへ出したレポートに返信をいただきました。</p>
<blockquote cite="https://sourceforge.net/tracker/?func=detail&#038;atid=540672&#038;aid=1481912&#038;group_id=74338" title="SourceForge.net: Modify: 1481912 - "CASCADE" is never enabled."><p><a href="https://sourceforge.net/tracker/?func=detail&#038;atid=540672&#038;aid=1481912&#038;group_id=74338">SourceForge.net: Modify: 1481912 &#8211; &#8220;CASCADE&#8221; is never enabled.</a></p>
<p>No, it is the user&#8217;s responsibility to do MyTable.dropTable(cascade=True).</p></blockquote>
<p>あー・・・。言語仕様がちゃんと理解できていない証拠を露呈していまいました。ぬぅ。<br/><br />
<br/><br />
[ref.] 外部キー付きのテーブルがdropできない。 &#8211; <a href="http://saikyoline.jp/weblog/2006/05/drop_1.html">http://saikyoline.jp/weblog/2006/05/drop_1.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2006/05/19/234807.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>外部キー付きのテーブルがdropできない。</title>
		<link>http://saikyoline.jp/weblog/2006/05/05/002303.html</link>
		<comments>http://saikyoline.jp/weblog/2006/05/05/002303.html#comments</comments>
		<pubDate>Thu, 04 May 2006 15:23:03 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=255</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>「TurboGears 0.9a5」に含まれている「SQLObject-0.7.1dev_r1675」でのはなし。<br/><br />
DBは「PostgreSQL 8.1.3」。<br/><br />
<br/><br />
テーブルを消そうとして</p>
<pre class="code"><code>$ tg-admin sql drop</code></pre>
<p>としたら</p>
<pre class="code"><code>HINT:  Use DROP ... CASCADE to drop the dependent objects too.</code></pre>
<p>とでた。CASCADEしてくれないのかよってことでSQLObjectのソースを追って納得。<br/><br />
<br/><br />
「sqlobject/postgres/pgconnection.py」の154行目あたり。</p>
<pre class="code"><code>    def dropTable(self, tableName, cascade=<strong>False</strong>):
if self.server_version[:3] &lt;= &quot;7.2&quot;:
cascade=<strong>False</strong>
self.query(&quot;DROP TABLE %s %s&quot; % (tableName,
cascade and 'CASCADE' or ''))
</code></pre>
<p>決してCASCADEされることはない、と。<br/><br />
で、<a href="http://sourceforge.net/tracker/index.php?func=detail&#038;aid=1481912&#038;group_id=74338&#038;atid=540672">通報しました</a>。つたない英語で。<br/><br />
<br/><br />
・・・そしていまなんとなくページをリロードしたらエントリが重複した。しっかりしてくれSF.net。<br/><br />
<br/><br />
ってことで、その件も<a href="http://sourceforge.net/tracker/index.php?func=detail&#038;aid=1481943&#038;group_id=1&#038;atid=200001">通報しました</a>。ココでよかったのかな？</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2006/05/05/002303.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>制約を含むモデルのmodel.pyへの定義。</title>
		<link>http://saikyoline.jp/weblog/2006/04/26/005848.html</link>
		<comments>http://saikyoline.jp/weblog/2006/04/26/005848.html#comments</comments>
		<pubDate>Tue, 25 Apr 2006 15:58:48 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=251</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>DBにPostgreSQLを指定したとき（他のDBを指定したことがないので他は不明です。:-P）に、model.pyでForeignKey()を使うと、外部キー制約がつきます。<br/><br />
<br/><br />
[ref.] SQLObject 0.7 &#8211; <a href="http://www.python.jp/~ymasuda/sqlobject/SQLObject.html">http://www.python.jp/~ymasuda/sqlobject/SQLObject.html</a><br/><br />
<br/><br />
ここで、ふつうにクラスを並べると、クラス名でソートされた順でテーブルが作成されるらしいのですが、ソート結果により依存関係が逆転してると当然のごとくエラーが出ます。<br/><br />
こんな時にはmodel.pyの中でsoClassesという名前でタプルを宣言しておくと、その順番でテーブルが作成されるようなので、この問題を回避することができます。<br/><br />
<br/><br />
サンプルコードを示します。（クラス名でソートするとEmployeeが先に来ることに注目。）</p>
<pre class="code"><code>soClasses = (
&quot;Group&quot;,
&quot;Employee&quot;
)

class Group(SQLObject):
name = StringCol()

class Employee(SQLObject):
firstName = StringCol()
lastName  = StringCol()
group     = ForeignKey(&quot;Group&quot;)
</code></pre>
<p>柴田さんとおおたにさんに感謝。<br/><br />
[ref.] <a href="http://groups.google.co.jp/group/turbogears-ja/browse_thread/thread/c4911f7a33fb3d51/18e996633d144992?tvc=2#18e996633d144992">PostgreSQLとTGの安定性はどうなんでしょう?</a></p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2006/04/26/005848.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TurboGearsちょっと進展。</title>
		<link>http://saikyoline.jp/weblog/2006/04/18/013534.html</link>
		<comments>http://saikyoline.jp/weblog/2006/04/18/013534.html#comments</comments>
		<pubDate>Mon, 17 Apr 2006 16:35:34 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=244</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>JSON出力のためにパラメータで「tg_format=json」を渡すと</p>
<pre class="code"><code>TypeError: pagelist() got an unexpected keyword argument 'tg_format'</code></pre>
<p>みたいなのが出てしまう件でのハマりからやっと脱出。<br/></p>
<p><a href="http://trac.turbogears.org/turbogears/ticket/740">#740 (tg_format parameter causing problems with JSON requests) &#8211; TurboGears &#8211; Trac</a></p>
<p>にバグとして報告されてました。対象メソッドに処理が渡る前にメインのコントローラの中でtg_formatパラメータを除外するはずが、できていなかったみたいです。なんかおかしな日本語ですがそんな感じ。<br/><br />
ちなみに0.9a5ではFIXされています。<br/><br />
待てないので修正個所</p>
<p><a href="http://trac.turbogears.org/turbogears/changeset/1113">[1113] &#8211; TurboGears &#8211; Trac</a></p>
<p>を見て自分で反映しました。<br/><br />
だいぶ時間を使いましたが構造がまた少し理解できた気がするのでよしとします。つかれた。<br/><br />
<br/><br />
[ref.] 黙々とTurboGears。 &#8211; <a href="http://saikyoline.jp/weblog/2006/04/turbogears.html">http://saikyoline.jp/weblog/2006/04/turbogears.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2006/04/18/013534.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>黙々とTurboGears。</title>
		<link>http://saikyoline.jp/weblog/2006/04/12/005404.html</link>
		<comments>http://saikyoline.jp/weblog/2006/04/12/005404.html#comments</comments>
		<pubDate>Tue, 11 Apr 2006 15:54:04 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=241</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.turbogears.org/docs/wiki20/">The 20 Minute Wiki</a>をゴニョゴニョしながら進める。<br/><br />
しっかし1.0に向けてバージョンがガシガシと上がっているせいか、ドキュメントとチュートリアルと実物がバラバラな個所もある。ソースを追うにもスキル不足で追い切れない。うぅむ。<br/><br />
チュートリアルにでてくる「turbogearsfmt=json」が「tg_format=json」に変わってるのは分かった。<br/><br />
でも、</p>
<pre class="code"><code>TypeError: pagelist() got an unexpected keyword argument 'tg_format'</code></pre>
<p>・・・寝るか。<br/><br />
<br/><br />
[p.s.] 2006-04-13<br/><br />
見てるチュートリアルと使ってるバージョンがおもいっきり違ってました。<br/><br />
使ってたTGは<strong>0.9a4</strong>で、デモムービーですが、それは<strong>0.8.9</strong>っぽい。（もっと古い？）<br/><br />
ともあれ、ちゃんと確認しなきゃ・・・orz。</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2006/04/12/005404.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TurboGears と PostgreSQLその２。</title>
		<link>http://saikyoline.jp/weblog/2006/04/09/000837.html</link>
		<comments>http://saikyoline.jp/weblog/2006/04/09/000837.html#comments</comments>
		<pubDate>Sat, 08 Apr 2006 15:08:37 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=240</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>TurboGearsでポスグレを使うためのpsycopg。動かせたのでメモ。<br/><br />
Pythonとポスグレはインストールずみが前提。<br/><br />
<br/><br />
psycopgのコンパイルに必要な「eGenix mx Extensions for Python」を<a href="http://www.egenix.com/files/python/eGenix-mx-Extensions.html">ダウンロード</a>してインストール。<br/><br />
実際に使われるのはこの中のmxDateTimeにあるヘッダファイルなんだけど。ともあれ、インストール。<br/><br />
同梱のsetup.pyで一発。楽だ。</p>
<pre class="code"><code># wget http://www.egenix.com/files/python/egenix-mx-base-2.0.6.tar.gz
# tar zxf egenix-mx-base-2.0.6.tar.gz
# cd egenix-mx-base-2.0.6
# python setup.py install
</code></pre>
<p>で、psycopgを<a href="http://www.initd.org/projects/psycopg1">ダウンロード</a>してインストール。<br/><br />
最初は1系でやってみた。</p>
<pre class="code"><code># wget http://initd.org/pub/software/psycopg/psycopg-1.1.21.tar.gz
# tar zxf psycopg-1.1.21.tar.gz
# cd psycopg-1.1.21
# ./configure \
&gt; --with-python=/usr/local/python24/bin/python \
&gt; --with-postgres-includes=/usr/local/pgsql/include \
&gt; --with-postgres-libraries=/usr/local/pgsql/lib \
&gt; --with-mxdatetime-includes=/usr/local/python24/lib/python2.4/site-packages/mx/DateTime/mxDateTime
# make
# make install
</code></pre>
<p>検証環境（というかcoLinux）なんだし、βでいいじゃないかと2系でもやってみた。<br/><br />
そもそもTG自体バージョンが1.0まで達してないし。<br/><br />
※以下pg_configにパスが通っている必要あり。</p>
<pre class="code"><code># wget http://initd.org/pub/software/psycopg/psycopg2-2.0b8.tar.gz
# tar zxf psycopg2-2.0b8.tar.gz
# cd psycopg2-2.0b8
# python setup.py build
# python setup.py install
</code></pre>
<p>easy_installが入っているなら、最後の２つは</p>
<pre class="code"><code># easy_install .
</code></pre>
<p>でよし。<br/><br />
<br/><br />
mx Extensionsといい、psycopg2といい、最近のPython関連はみんな</p>
<pre class="code"><code># make
# make install
</code></pre>
<p>↓</p>
<pre class="code"><code># python setup.py build
# python setup.py install
</code></pre>
<p>または</p>
<pre class="code"><code># easy_install .
</code></pre>
<p>なのかな？<br/><br />
<br/><br />
[ref.] TurboGears と PostgreSQL。 &#8211; <a href="http://saikyoline.jp/weblog/2006/04/turbogears_postgresql.html">http://saikyoline.jp/weblog/2006/04/turbogears_postgresql.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2006/04/09/000837.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TurboGears と PostgreSQL。</title>
		<link>http://saikyoline.jp/weblog/2006/04/06/013052.html</link>
		<comments>http://saikyoline.jp/weblog/2006/04/06/013052.html#comments</comments>
		<pubDate>Wed, 05 Apr 2006 16:30:52 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=237</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>DBにポスグレを選んでハマる。<br/></p>
<pre class="code"><code>$ tg-admin sql create
Using database URI postgres:...
...
ImportError: No module named psycopg</code></pre>
<p>「psycopg」ってナニ？ってことで調べると</p>
<blockquote><p><a title="initd.org" href="http://www.initd.org/projects/psycopg1">initd.org</a></p>
<p>psycopg is a PostgreSQL database adapter for the Python programming language.</p></blockquote>
<p>とのこと。で、インストールだってことで</p>
<pre class="code"><code>$ ./configure ...
...
checking for mxDateTime.h... configure: error: can't build without mx headers</code></pre>
<p>・・・今日はあきらめて寝る。<br/><br />
<br/><br />
[p.s.] 2006-04-09<br/><br />
使えるようになりました。<br/><br />
[ref.] TurboGears と PostgreSQLその２。 &#8211; <a href="http://saikyoline.jp/weblog/2006/04/turbogears_postgresql_1.html">http://saikyoline.jp/weblog/2006/04/turbogears_postgresql_1.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2006/04/06/013052.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>つい・・・。</title>
		<link>http://saikyoline.jp/weblog/2006/03/29/224400.html</link>
		<comments>http://saikyoline.jp/weblog/2006/03/29/224400.html#comments</comments>
		<pubDate>Wed, 29 Mar 2006 13:44:00 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=231</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<blockquote><p><a title="Google グループ : turbogears-ja" href="http://groups.google.com/group/turbogears-ja">Google グループ : turbogears-ja</a></p>
<p>説明: TurboGearsに関する日本のコミュニティ発足に向けてのグループ。TurboGearsとTurboGearsに関連するプロジェクトの日本での情報交換をしたいな。</p></blockquote>
<p>あまりにタイムリーなので決意表明。いまちょうど読んでるのをそのまま日本語にするだけだし。<br/><br />
あ、メンバーとしてです。ホストではなく。そのへん弱気。</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2006/03/29/224400.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TurboGearsインストールにつまづく。</title>
		<link>http://saikyoline.jp/weblog/2006/03/28/004917.html</link>
		<comments>http://saikyoline.jp/weblog/2006/03/28/004917.html#comments</comments>
		<pubDate>Mon, 27 Mar 2006 15:49:17 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[TurboGears]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=230</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<blockquote><p><a title="TurboGears: Installation on *nix-Like Systems" href="http://www.turbogears.org/download/nix.html">TurboGears: Installation on *nix-Like Systems</a></p>
<p>Even though you don&#8217;t have Easy Install yet, you can still take advantage of it. Instead of one-command installation, it will be two-step installation. And, you&#8217;ll have Easy Install for the next update!</p></blockquote>
<p>って言われても、</p>
<pre class="code"><code>ez_setup.py -f http://www.turbogears.org/download/index.html --script-dir /usr/local/bin TurboGears</code></pre>
<p>の意味が分からなくて気持ち悪くて先に進めない。<br/><br />
-f オプションはナニを指定してるの？ &#8211;script-dir ってなにさ？<br/><br />
<br/><br />
こういうことある度に思うのだが、損な性格してるかも・・・。<br/><br />
<br/><br />
p.s. 投稿直後<br/><br />
ソッコーで自己解決。python ez_setup.py &#8211;help ってできる。ez_setup.py のソース読み始めてたよ・・・。</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2006/03/28/004917.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
