{"categories":["\u6280\u8853"],"height":"190","title":"Flask \u306e abort() \u3068 psycopg2 \u306e\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u304c\u30ed\u30c3\u30af\u3092\u624b\u653e\u3055\u306a\u3044\u3053\u3068\u306b\u3064\u3044\u3066: \u660e\u793a\u7684\u306b commit() \u3092\u547c\u3076\u3068\u3088\u3044","blog_url":"https://blog.utgw.net/","blog_title":"\u79c1\u304c\u6b4c\u5ddd\u3067\u3059","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.utgw.net%2Fentry%2F2017%2F11%2F14%2F003842\" title=\"Flask \u306e abort() \u3068 psycopg2 \u306e\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u304c\u30ed\u30c3\u30af\u3092\u624b\u653e\u3055\u306a\u3044\u3053\u3068\u306b\u3064\u3044\u3066: \u660e\u793a\u7684\u306b commit() \u3092\u547c\u3076\u3068\u3088\u3044 - \u79c1\u304c\u6b4c\u5ddd\u3067\u3059\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"tl;dr psycopg2\u3092\u4f7f\u3046\u3068\u304d\u306f\u306fSELECT\u53e5\u3060\u3051\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u3082\u660e\u793a\u7684\u306b conn.commit() \u3092\u3059\u308b\uff0e \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30de\u30cd\u30fc\u30b8\u30e3\u3092\u4f7f\u3046\u3068\u3059\u3063\u304d\u308a\u66f8\u3051\u308b\uff0e \u73fe\u8c61\u3068\u8abf\u67fb\u7d50\u679c Flask\u3068PostgreSQL(psycopg2)\u3092\u7528\u3044\u305fweb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u3067\uff0c404\u3084403\u3092\u8fd4\u3059\u30c6\u30b9\u30c8\u306e\u6b21\u306b\u5b9f\u884c\u3055\u308c\u308b\u30c6\u30b9\u30c8\u304c\u7d42\u4e86\u3057\u306a\u3044\u3068\u3044\u3046\u73fe\u8c61\u306b\u906d\u9047\u3057\u305f\uff0e def db(): if hasattr(g, 'db'): g.db = psycopg2.connect(...) return g.db @app.route('/@<strting:username>') def userpa\u2026","type":"rich","width":"100%","url":"https://blog.utgw.net/entry/2017/11/14/003842","author_url":"https://blog.hatena.ne.jp/utgwkk/","provider_name":"Hatena Blog","image_url":null,"version":"1.0","published":"2017-11-14 00:38:42","author_name":"utgwkk"}