バンコク旅行 まあなんかいろいろあったが、予定通りバンコクに旅行に行った。 夜中に出発。なぜなら安いので。 早朝のスワンナプーム国際空港。でっかい。 何のタンクかわからんけど、たくさんのロゴマークが模様を作っていて面白かった。 ワット・ポー。 妙にかわいい麒麟。 タイ…

Flask is a lightweight WSGI web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications. It began as a simple wrapper around Werkzeug and Jinja and has become one of the most popular Python web application frameworks. Flask offers suggestions, but doesn't enforce any dependencies or project layout. It is up to the developer
最近人気な Heroku 。 Python に対応したそうなのでいじってみました。 以下、Flask を使った場合の手順。 参考サイト: Heroku で Flask + SQLAlchemy を使う - Twisted Mind http://d.hatena.ne.jp/Voluntas/20110920/1316529816 Heroku | Dev Center | Getting Started with Python on Heroku/Cedar http://devcenter.heroku.com/articles/python 環境 Mac OS X ( 10.6.8 ) Git はインストール済みなので割愛。 Heroku アカウントは取得済み。 Ruby インストール 宗教上の理由により port で。 $ sudo port install ruby gem up
February 3, 2011Frictionless Web Development with Flask Static Sites with a Lightweight Python Stack.For a while I’ve been looking for a more fluid toolkit for rapidly developing and iterating static sites. I have three use cases in mind: client html mockups with rapid iterations or slight variations, maintaining the static client sites that I have in the stable, and hacking on my own site. In eac
Heroku | Cloud Application Platform Django は動いたので、さて Flask と SQLAlchemy です。 github https://github.com/voluntas/heroku-template-flask 環境 Mac OS X Lion でやっているので、Linux や Windows だとまた別だと思います。 必須 Git Python 2.7 heroku Flask をデプロイする準備 最低限必要なのは virtualenv です。 easy_install なり pip で virtualenv が使える環境は作っておきましょう。 とりあえずプロジェクトフォルダを作成 $ mkdir heroku-flask-sqlalchemy $ cd heroku-flask-sqlalchemyvirtualenv 環境をフォル
RaycastにはScript Commandsという機能があり、ずっとずっと気になっていたのでGW中に重い腰を上げて試してみた。最近会社の人にRaycastをオススメすることが多くなってきたのだけれども、「Raycast歴1年以上経つのにScript Commandsも使ったことないの?」みたいに後ろ指差されないようにするためにも... Script Commandsとは? 簡単にいうとCUIのコマンドをRaycastから呼び出せるというただそれだけのものっぽい。「っぽい」というのは単純に自分がちゃんと調べてないだけです。はいテキトーですいません。 なにを作るか? Hello Worldを出力するだけのScript Commandsを作っても仕方がないので、よく自分でやっている単純作業を自動化するスクリプトを考えてみた。結果として生まれたのは、以下のような beforeの文字列をafte
Flask なんでそこまで大規模ではないですが、 1ファイルでは厳しくなってたので分割しました。 Flask 0.7.2 を使用で、 より大きなアプリケーション ― Flask v0.5.1 documentation http://a2c.bitbucket.org/flask/patterns/packages.html に従って、Module で定義すると、起動時に次のような警告。 (起動はするので動きはする main.py:7: DeprecationWarning: Modules are deprecated. Upgrade to using blueprints. Have a look into the documentation for more information. If this module was registered by a Flask-Extensio
火曜から触り始めた Flask。 早速 checkbox が複数ある時の値取得で詰まったのでメモ。 HTML でこんな時 <form method="GET" action="/"> <label><input type="checkbox" name="ch" value="1" />1</label> <label><input type="checkbox" name="ch" value="2" />2</label> <input type="submit" /> </form> GET パラメータは /?ch=1&ch=2となるので、普通に ch = request.args.get("ch", "") では、「ch=1」しか取れてきません。 なので、「getlist」を使うと ch = request.args.getlist("ch") リスト形式で2つとも取得できます。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く