2006/04/18 21:24 | 0 Comments Pythonもフレームワークを使って開発してみようということで、いろいろ物色。基本方針は軽量の単機能フレームワークを組み合わせて使うということで。 使わせてもらうことにしたのは次の3つ。 ・web.py Webアプリケーションのフレームワーク。ファイルひとつで全部やってしまおうというシンプルさがいいなと思った。 ・Cheetah テンプレートエンジン。JSPを意識したPSPというのもあったんだけど、できるだけシンプルな書式で使えるようにするという方針らしいのでCheetahを使うことに。 ・SQLObject ORマッパー。定番らしい。 で、web.pyのページを見るとlighttpdとFastCGI使えよって書いてあったので、使ってみることに。以下はそれら全部のインストールメモ。 まずlighttpdのインストール。yumならこ
Translations: Srpsko-Hrvatski 2012 note: This article was first published in 2005. After it was published, Django launched a RemovingTheMagic project to address some of my criticisms (though personally I still find it unusable), web.py inspired FriendFeed’s tornado.web and Google’s gae.webapp and others (though I still prefer web.py), and this article led to a permanent surge in Reddit traffic tha
A Simple Webpy Tutorial Today we'll be writing a simple todo list application. My goal is not to show you the finer points of todo lists, but rather to show you how to properly set up a webpy project for small to medium sized applications. First, let's look at a very simple "hello world" example. import web urls = ('/', 'index') class index: def GET(self): print "Hello, world!" if __name__ == "__
Google App Engine上でweb.pyとかCherryPyとか動かないという報告がいくらかあったのでまとめてみます。 Google App Engineでは、以下で述べられているように「WSGIに対応したCGI(と呼ばれるもの)であれば、フレームワークとして扱えるよ」と言っています。 Using the webapp Framework - Google App Engine - Google Code The CGI standard is simple, but it would be cumbersome to write all of the code that uses it by hand. Web application frameworks handle these details for you, so you can focus your developme
id:nishiohirokazuさんがweb.pyを試してみてるようです。 web.py - 西尾泰和のはてなダイアリー web.pyはおっしゃるとおり、かなり見よう見まねで使えるアプリなのですが、いろいろ注意して使わないとはまる箇所があります。 Welcome to web.py! (web.py) 特にDBにはまる箇所がたくさんあるので、もう僕はweb.pyのDB機能は使うことをすっぱりあきらめて全てSQLobjectを使うことにしました。SQLObjectはPythonの標準的なO/Rマッパーで、完成度が高いです。SQLiteもPython2.5で標準モジュールとなったsqlite3を直接叩くのではなくSQLObjectから使った方が幸せになれそうです。 SQLObject — SQLObject 3.9.1 documentation そういえば、2週間くらい前SQLObject
web.pyを使ってテストをしていると、ログに "GET /favicon.ico HTTP/1.1" 404 -と表示されてうざい。 最近のブラウザは無条件にトップディレクトリ下に favicon を探しに来るけど、そんなコンテンツは知らない web.py は「知らんよ」と返すしかない。 web.py では、デフォルトで ./static に静的コンテンツを置いて参照できるようになっているが、こんどはブラウザ側はそんなことは知らない。 他の人の書いたサンプルなどを見ると、webサーバーの rewrite roule で見えるようにしているようだ。favicon の送り出しが web.py を経由しない分、処理は軽くなるので、この方法はかしこい。 でも、単体サーバーで起動してテストしている時には、この方法は使えない。あとは、コンテンツ側で ico ファイルを javascript 指定して
Basics Hello World Serving Static Files Understanding URL handling Seeother and Redirect using subapplications Serving XML Reading raw data from post Advanced Contextual and Environment variables - web.ctx Application processors, loadhooks and unloadhooks How to use web.background Custom NotFound message How to Stream Large Files Control over logging for default HTTPServer SSL support in built-in
Not your computer? Use a private browsing window to sign in. Learn more about using Guest mode
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く