Jinja2ãå°å ¥ããã°ç°¡åã«å½éåã§ããã¨æã£ãã大ééãã ã£ããJinja2ã¨å½éåãã¬ã¼ã ã¯ã¼ã¯ã®Babelã使ããã¨ã§ãDjangoã®å½éåæ©è½ã¨åããããªãã¨ãå®ç¾ã§ãããã¨ãããã¨ã ã£ãããããä½åº¦ããKay Frameworkã«ãã¨ããè¯ãã£ãã...ãã¨æã£ãã è¦å´ãããã©ã©ãã«ãããã«ãå½éåã§ããã®ã§ãæ¹æ³ãã¡ã¢ã£ã¦ãããã¡ãªã¿ã«appengineã§Jinja2ã使ãæ¹æ³ã«ã¤ãã¦ã¯å¥ã®è¨äºã«æ¸ããã®ã§ãã¡ããè¯ãã£ãããèªã¿ãã ããã Babelã®æ¬ãµã¤ã(ãã¦ã³ãã¼ãã¨ããã¥ã¢ã«)http://babel.edgewall.org/ Babelã®ä½¿ãæ¹ã«ã¤ãã¦åèã«ããã¦ããã ããè¨äºhttp://d.hatena.ne.jp/nullpobug/20100923/1285251361 ä¸è¨ã®ãããªæ¹æ³ãã¨ãã¾ããã Babelã¨Jinja2ãã¤ã³ã¹ãã¼ã«Babel
hgwebcommitã®i18nã§Flask-Babelã使ã£ãã®ã§ã¡ã¢ã Flask-Babelã¯Flaskã®Babelãã«ãã¼ã Flask-Babel â Flask Babel 1.0 documentation ã¤ã³ã¹ãã¼ã« pip install Flask-Babelflaskext.babelã使ããããã«ãªãã Flask-Babelãã¢ããªã±ã¼ã·ã§ã³ã«é©ç¨ãã applicationããBabelãªãã¸ã§ã¯ããä½ã Flaskã®ã¤ã³ã¹ã¿ã³ã¹ãå¼æ°ã«ãã¦Babelã®ã¤ã³ã¹ã¿ã³ã¹ãä½ã£ã¦ããã babelãªãã¸ã§ã¯ãã®ãã³ã¬ã¼ã¿ã¡ã½ããã§localeãåå¾ããããã«æ¸ãã # coding:utf-8 from flask import Flask, g, request from flaskext.babel import Babel app = Flask(__name
This webpage was generated by the domain owner using Sedo Domain Parking. Disclaimer: Sedo maintains no relationship with third party advertisers. Reference to any specific service or trade mark is not controlled by Sedo nor does it constitute or imply its association, endorsement or recommendation.
Heroku 㧠Pythonãåããããããã¨ããæ å ±ããã¡æ©ããã£ãã(大åé ã) ããã®ã§ãã£ã¦ã¿ãäºã«ãããFlaskã®ãã¥ã¼ããªã¢ã«ã§ä½ãã¢ããªãFlaskrãã Heroku + Amazon RDS(MySQL5.5) ã§åããã¾ãã Herokuæ¨æºã®Postgresã¨ãã®é£æºæé ã¨ãã¯ãæ¢ã«è¯ãã¾ã¨ã¾ã£ã¦ãããã°ãããã®ã§ãä¸çªæå¾ã®åèURL群ãåç §ãã¦ãã ãããããã§ã¯ãã£ãã¡ãªäººã®ããã«ãä¸æ°ã«Herokuã¢ããªã¨ãRDSã¤ã³ã¹ã¿ã³ã¹ãä½ãã¹ã¯ãªãããæãã¦ããã¾ããæé ãã·ã§ã«ã¹ã¯ãªããåããã ãã¨ãããã¾ãã ç°å¢ MacOSX (Lion) ã§ã®ä½æ¥ãåæã¨ãã¦ãã¾ãã åæ 以ä¸ã®ãã®ã使ããããã«ãªã£ã¦ããå¿ è¦ãããã¾ãã AWS ã¢ã«ã¦ã³ã Heroku ã¢ã«ã¦ã³ã heroku(ruby gems) bash git virtualenv pip rd
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 ç°å¢ããã©ã«
Pythonã®ãã¤ã¯ããã¬ã¼ã ã¯ã¼ã¯Flaskã§ã¯ JSONãè¿å´ããããã®ã¡ã½ããjsonifyãå®ç¾©ããã¦ããã from flask import Flask from flask import jsonify app=Flask(__name__) @app.route('/test.json') def test_json(): return jsonify(res='test') if __name__ == '__main__': app.run() /test.jsonã§ãªã¯ã¨ã¹ããã㨠{ res:'test' } ã¨ããçµæã帰ã£ã¦ãã JSONPã«ãããå ´åã¯jsonifyã¯ä½¿ããªãã @app.route('/test.jsonp') def test_jsonp(): import json request.args.get('callback') + '(' +
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}