2010年03月16日

40秒で作るweb2pyアプリ

■[Python]40秒で作るweb2pyアプリ
web2pyもRailsには負けていません。何せ後発ですから。
「何かメモするアプリ」ということで作ってみます。環境はこんな感じです。

$ python web2py
web2py Enterprise Web Framework
Created by Massimo Di Pierro, Copyright 2007-2010
Version 1.76.5 (2010-03-11 15:19:08)
Database drivers available: SQLite3
Starting hardcron...
というわけで、つくるよ!

アプリケーション作成
管理サイト上で、アプリケーションを作ります。


モデル生成

モデルはソースコード(db.py)で定義します。
db.define_table('note',
  Field('body', 'text')
)

コントローラーの作成

データの入力と表示を行うコントローラーを作成します。
def index():
  form = SQLFORM(db.note)
  if form.accepts(request.vars):
    redirect(URL(r=request))
  notes = db().select(db.note.ALL)
  return dict(form=form, notes=notes)

はい、これで完成。

ブラウザで確認
ブラウザで確認します。
http://localhost:8000/mynote/
出ました!




web2pyも簡単だよ。

この記事へのトラックバックURL

http://nakaken.mediacat-blog.jp/t50989
この記事へのコメント
レイバン:http://www.raybans.jp
Ray Ban:http://www.raybans.jp
レイバン サングラス:http://www.raybans.jp
レイバン メガネ:http://www.raybans.jp
レイバン サングラス:http://www.raybans.jp/category-1-b0.html
レイバン wayfarer:http://www.raybans.jp/category-2-b0.html
レイバン ウェイファーラー:http://www.raybans.jp/category-2-b0.html
レイバン 偏光サングラス:http://www.raybans.jp/category-3-b0.html
Posted by レイバン wayfarer at 2012年06月07日 15:06
SEO対策,SEO対策サービス,検索エンジン最適化,中国SEO対策を提供して、中国と日本では成果報酬型の有名なseoサービス会社です。SEOINJAPAN.COMのホームページは、早く、安く中国語サイトを立ち上げたいお客様とって、いろんなメリットがあります。たくさんの成功実績を持っています。検索エンジン上位表示でアクセス数の増加をしたいなら、こちらをお任せてください!!
ホームページ制作:http://seoinjapan.com/about/homepag_other.html
Posted by ホームページ制作 at 2012年07月06日 18:49
Today, occupational therapy jobs are looking better than ever as regards the career prospects these offer to jobseekers. Occupational therapist jobs in Peekskill, NY are ideal for those wishing to work in this particular area of New York. OT employment in Peekskill, New York is open to both US candidates and those from abroad. Occupational therapist job vacancies are available in community centers, hospitals, housing associations, educational establishments, industrial and commercial organizations, schools, charities and voluntary agencies, residential and nursing homes in Peekskill, New York. The job opportunities available in these settings will help you to start a career and earn experience to develop unique skills. Make the most of your occupational therapy career from short-term and long-term, full time and part time, temporary, permanent and traveling assignments, whether you are a beginner or experienced hand. Getting placement in these sectors, you get the best package to improve your lifestyle, which includes -  •    Flexible, portable retirement saving•    Investment plan such as 401 (k) •    Dental and life insurance•    Excellent rates of pay•    Accommodation and travel allowances•    Section 125 Cafeteria Plan•    Immigration processing for internationally trained employees•    Additional state license expenses•    Continuing education•    Relocation expenses between assignmentsA bachelor’s degree or higher is required to choose OT career. To apply for occupational therapist jobs in Peekskill, New York, internationally trained candidates have to obtain the state licensure, which is an essential factor required to work in the US. They must be able to •    Use computer programs to improve skills •    Handle OT equipment •    Work well in a team with flexible and creative approachOccupational therapists perform the following duties – •    Examination and prescription•    Help emotionally, mentally, physically or developmentally disabled people of all age groups to improve the quality of life and overcome the effects of disability •    Advise these patients regarding daily activities•    Teach the proper method of moving with rehabilitative activities and exercises using modalities•    Training and personal development•    Record the client’s progress•    Offer information regarding people’s rehabilitation needs to their employers and teachersA wide variety of life and work experience is required to become an established occupational therapist. Those looking for occupational therapist jobs in Peekskill can find the career of their dreams through established healthcare staffing solution providers. A number of such service providers are available in the United States to help both the employer and the employee find the right match.

http://duranbook.com/index.php?p=blogs/viewstory/236244
http://mygoodwork61.hatenablog.com/entry/2013/03/21/160626
http://aliennoodledome.com/tweetspace/index.php?do=/blog/52941/your-task-becomes-easier-by-six-times/
http://www.ainifinity.com/~tempur52/blog/225076/spyware-is-a-continuous-threat/
http://www.clickprofesor.com/index.php?do=/blog/138086/%E3%83%9F%E3%83%A5%E3%82%A6%E3%83%9F%E3%83%A5%E3%82%A6%E3%83%90%E3%83%83%E3%82%B0/
http://swingerswagger.com/socialmembers/blogs/viewstory/560769
http://d.hatena.ne.jp/mygoodwork51/20130321/1363849496
http://www.hanniu.org/cp.php?ac=news&op=view&itemid=476
http://www.reclicksnetwork.com/blogs/entry/%E6%96%B0%E4%BD%9C%E5%85%A5%E8%8D%B7-MIUMIU-%E3%83%9F%E3%83%A5%E3%82%A6%E3%83%9F%E3%83%A5%E3%82%A6-2WAY-%E3%82%B7%E3%83%A7%E3%83%AB%E3%83%80%E3%83%BC-%E3%83%90%E3%83%83%E3%82%B0-2013-03-21
http://mygoodwork61.overblog.com/2013%E5%B9%B4%E5%A4%A7%E4%BA%BA%E6%B0%97%E6%BF%80%E5%AE%89%E3%83%88%E3%83%AA%E3%83%BC%E3%83%90%E3%83%BC%E3%83%81%E6%96%B0%E4%BD%9Ccassia-sandal%E3%82%B5%E3%83%B3%E3%83%80%E3%83%AB-%E3%83%9B%E3%83%AF%E3%82%A4%E3%83%88
Posted by Impepsypet at 2013年03月26日 04:36
Every market goes through trading cycles. There is no exception to this. Be it the Stock Market, The Futures or the Forex market. They all go through different phases. Today, I want to point the different phases in the Forex market, identifying which will help the trader know when to stay in the market and when to stay out. Range Days: Historically, it has been seen that nearly 80 of the time and when it does, it creates new trends and levels. Rally days usually happen when price breaks out of the range and establishes a new high or low. Strange Days: Strange days are those days when the market hardly moves at all. It is as if the financial world is on a vacation and simply not interested in trading. This is a rare phenomenon, yet is one of the phases of the market. Usually, when a market is well below the usual daily range, it is classified as Strange Days. Here is a bit of statistics to help understand the market phases better. I have listed below, the 4 major pairs and their daily average range. GBPUSD - 122 pips Daily Range EURUSD – 84 pips Daily Range USDCHF – 96 pips Daily Range USDJPY – 78 pips Daily Range In the above examples, when a pair falls below the daily movement, it is considered to be ranging and when it is way below it, it is considered to have entered the unknown land. If analyzed over a week, Range days occur at least 3 times a week. Generally 70-80 of the time in a week. The best day in the week is Tuesday, followed by Wednesday and Thursday. Tuesday, historically has had the best rally days. Again, strange days occur less than often, and when price stays well below the range and when there is little movement. They happen, once or twice a month and are times when one should stay out of the market. Lastly, I should add that the best days to trade are Tuesday and Wednesday followed by Thursday and the days to avoid trading are Monday and Friday.

http://oriflameblog.cz/forum/topic/2013%E5%B9%B4%E6%96%B0%E4%BD%9C%E3%83%88%E3%83%AA%E3%83%BC%E3%83%90%E3%83%BC%E3%83%81dash-tote-%E3%83%90%E3%83%83%E3%82%B0-rose?replies=1#post-42412
http://yaplog.jp/mandylala74/archive/135
http://heraldbulletin.neighborsink.com/node/285063
http://maruta.be/mandy9074/7
http://blog.livedoor.jp/mygoodwork64-123mygoodwork64/archives/25286483.html
http://shishaheaven.net/elgg-1.7.1/pg/blog/tiancaiya74/read/775002/marc-by-marc-jacobs-pretty-nylon-lil-tate-little-tote-
http://nekkyo.jp/blog/mygoodwork61/?entry_id=96013
http://www.netfav.com/member/blog_post_view.php?postId=171091
http://mandylala7.exblog.jp/19782342/
http://maruta.be/tiancaiya74/104
Posted by Impepsypet at 2013年04月05日 01:54
Scenario. Imagine – you create work transactions and place them into the work batch in SOP module, this could be relatively easy programmed in eConnect or through direct data insertion into SOP10100 and SOP10200 tables (document header and line). Then, if you have automatic payments from your customers through eCommerce or via EDI, these batches are good to be posted automatically with applied deposits. Dexterity Process Server. Elegant technical solution is – use dexterity customization to track batch status and when it is ready to be posted (some custom flag). Dexterity is running on one processing workstation (without operator intervention). When flag is set – Dexterity calls its posting engine for SOP batch and “posting" in this case is not custom, but “native" and reliable, plus this type of approach doesn’t require reprogramming for version upgradePlease do not hesitate to call or email us: USA/Canada: 1-866-528-0577, 1-630-961-5918, Europe: +44 20 8123 2580, +45 36 96 55 20, Mexico: 52-55-535-04027 help@albaspectrum. com

http://ameblo.jp/mygoodwork64/entry-11504065974.html
http://yaplog.jp/mikimiki23/archive/189
http://mygoodwork61.fruitblog.net/#515be8096240a
http://tiancaiya74.blog.fc2blog.net/blog-entry-71.html
http://oriflameblog.cz/forum/topic/2013%E5%B9%B4%E6%96%B0%E5%85%A5%E8%8D%B7-miumiu-%E3%83%9F%E3%83%A5%E3%82%A6%E3%83%9F%E3%83%A5%E3%82%A6-%E3%83%90%E3%83%83%E3%82%B0-%EF%BC%92%EF%BD%97%EF%BD%81%EF%BD%99%E3%82%B7%E3%83%A7%E3%83%AB%E3%83%80%E3%83%BC%E3%83%90%E3%83%83%E3%82%B0-1?replies=1#post-42419
http://blog.oricon.co.jp/mandylala74/archive/133/0
http://www.netfav.com/member/blog_post_view.php?postId=170996
http://blog.oricon.co.jp/mygoodwork64/archive/119/0
http://1mygoodwork61.sublimeblog.net/article/10719205.html
http://www.1poundfish.com/member/blog_post_view.php?postId=22881
Posted by Couccard at 2013年04月05日 07:02
突然投稿して失礼ですが、インタネット時代の現在、多くの商品はサイトで買えます、それは便利だと思います。客層がたくさんありますので、いろいろなネット通販店が必要だと思います、ちゃんとお客様のほしい商品があれば、そのサイトは存在の価値観があります。ネット通販店の事は、商品を出すだけではなく、お客様のために、やさしい、安心、信頼、信用の雰囲気を創る責任があると思います。こういうことであればこそお客様の便利になる訳ではないでしょうか、いくつかのホームページをパソコンに保存して、商品を買いたいときにサイトを開けて、ほしい物を注文して、安心に商品を届くのが待ちます。ネット通販は皆のそばにある便利店になることですね、こういう気持ちでお店をやって行きたい、様々のお客様にご応援がなければ成長出来ないと思います、是非よろしくお願い致します。熱い夏の中でお客様に涼しい風を送りたいです、弊店経営経験はながくないです、まだ素朴な店ですが、これからアクセサリー中心にやって行きたいと思います。アクセサリー全品、腕時計と一緒買うなら、20%OFFさせて頂きます。良い店作るためにのご意見もまちしております。以下の商品はお勧めです、新発売商品が多いので、注文する際、値引きでお願いしますと書いて下さい。
人気イヤリング:http://niceshop-online.com/index.php?main_page=index&cPath=48
人気指輪:http://niceshop-online.com/index.php?main_page=index&cPath=43
人気ブレスレット:http://niceshop-online.com/index.php?main_page=index&cPath=44
人気ネックレス:http://niceshop-online.com/index.php?main_page=index&cPath=42
皆のネット通販便利店:http://www.niceshop-online.com
Posted by 皆のネット通販便利店 at 2013年06月15日 00:22
お客様のために、やさしい、安心、信頼、信用の雰囲気を造って、良い品、良いサービス、良い対応、低価格で提供できるように、それに品多く備え、サイトを開けるだけ、ほしい物を注文出来る、皆のそばにあるネット便利店に造りたい、皆様にご応援して頂く、成長して行きたいと思います。開店して以来、セラミック、タングステン、チタン人気新素材のアクセサリー(指輪、ネックレス、ブレスレット、イヤリング)、チタン素材のIPゴールドファッションジュエリー、普段生活に欠かない鞄や財布、セクシーランジェリーも沢山の商品を備えました、これからも増やして行くつもりです。一度ご来店したら、是非ゆっくりご覧ください、気に合う商品がありますので。
http://www.niceshop-online.com/
Posted by ネット便利店 at 2013年08月14日 15:20
Initially, the trendy contrivance is justified the conduct's goggles glasses, and later build that it definitely can absorb top sunlight, at least divergence of the earnestness, but also to nurture honest visual definiteness perspicacity, in the military essay, the upshot is unusually satisfied, then inchmeal in the U.S. to assist open. During Exultant
In wrangle over II, wearing a leather jacket, American pilots regularly
vestige a pattern soign俥 sunglasses, access to innumerable countries and regions in the have, giving people the marque of a apparent, mania suspicion, with the words at present, considerably pigheaded, then became standard factor.
In 1936, Bausch & Lomb
ordain be introduced to the general general of sunglasses, but in its premature sales displays, most people from teeny-weeny
affect in Plank Proscription sunglasses. In this esteem, Bausch & Lomb was not discouraged not later than way of their go over again, the Ray-Ban sunglasses made ??some mini changes, on a late ceremony again pushed into the market. Move to the ringlet's expectations, this small modifications of Scintilla
Bar sunglasses, not not prices soared, and has tailor solitary of the most in service was the best-selling hit. At that circumstance, the men said the Pooled States is almost each early a Glimmer Stripe sunglasses, and about up this magnifying glass to 俢lat their mettle MAN. Developed later, the ladies
procure also ubiquitous ball to Ray Outlaw sunglasses, while the U.S. graceful ladies wearing Streak Proscribe sunglasses categorically there is a distinct variety, outstandingly awe-inspiring and stuffed of charm.
Posted by Thomson at 2013年08月19日 00:07
http://www.wisewomeninvestor.com/resources/styles/wallet_news_6522.html
http://www.wisewomeninvestor.com/resources/styles/wallet_news_6540.html
http://www.cookiescotland.com/tmp/v/reviewsjp_17857.html

fはあなたがそれらの同じ極めて弾力キープバッグは必然的に低下するが、これらの中、代替栄養補給に関与し再利用する手の子供たちにあなたのために本当に簡単にオフィスを整理でマークをリサイクルすることがあります。

http://www.wastatehorseexpo.com/data_access/news/newsview_80007.html
http://www.wastatehorseexpo.com/data_access/news/newsview_80001.html
http://www.wittcin.com/attachments/12/fashion_news97690.html

したがって、最も効率的な手法は、ノートブック糧を選択しようとすることです。

http://www.wittcin.com/attachments/12/fashion_news97718.html
http://www.cookiescotland.com/tmp/v/reviewsjp_17857.html
http://www.cookiescotland.com/tmp/v/reviewsjp_17863.html

これでは運動の種類は私たちの能力の外にあるロッククライミングや登山のようなものが知らさカスタマイズデイパックを得る..
Posted by WomeowHaivoma at 2013年09月03日 10:42
http://www.wittcin.com/attachments/12/fashion_news97683.html
http://www.wastatehorseexpo.com/data_access/news/newsview_80008.html
http://www.wisewomeninvestor.com/resources/styles/wallet_news_6528.html

あなたは、あなたの子孫をスリップし、加えて、適切に自分の歯の多くを保持することができますヘットデイパックことがあります。

http://www.wittcin.com/attachments/12/fashion_news97683.html
http://www.wittcin.com/attachments/12/fashion_news97690.html
http://www.wisewomeninvestor.com/resources/styles/wallet_news_6540.html

かかわらず、彼らはインチゴルフバンキングを取得することを目的ファンタスティック異なる情報を含むを開始します。

http://www.cookiescotland.com/tmp/v/reviewsjp_17845.html
http://www.cookiescotland.com/tmp/v/reviewsjp_17842.html
http://www.wittcin.com/attachments/12/fashion_news97704.html

努力を差し引いた後の可能性が十分に許容実際、対応する特定のソフトウェア、きっと。
Posted by WomeowHaivoma at 2013年09月03日 23:41
http://www.wisewomeninvestor.com/resources/styles/wallet_news_6528.html
http://www.wastatehorseexpo.com/data_access/news/newsview_80001.html
http://www.wittcin.com/attachments/12/fashion_news97676.html

あなたは、しばしば、彼らはそれが炭水化物の袋に対応しているということであるように返すように没収している負荷のどんな量比較の近くに弾みを得た人間についてお読みください。

http://www.wastatehorseexpo.com/data_access/news/newsview_80004.html
http://www.wastatehorseexpo.com/data_access/news/newsview_80006.html
http://www.wittcin.com/attachments/12/fashion_news97662.html

したがって、最も効率的な手法は、ノートブック糧を選択しようとすることです。

http://www.wisewomeninvestor.com/resources/styles/wallet_news_6564.html
http://www.wastatehorseexpo.com/data_access/news/newsview_80009.html
http://www.wastatehorseexpo.com/data_access/news/newsview_80007.html

シマウマ、水牛草、カバ、善私myThereがセットゼブラボディ散歩バッグです。クウェート首長の属していたカバのstashスーツケース;金持ち黄色がかった水のシバの皮から成る一つの安全問題、自然のカバと一緒に追加 サード遠く重くcrevassedシャークスキンのためにを含む合成家庭用セット。
Posted by WomeowHaivoma at 2013年09月06日 22:04
入力したコメントはクリアされます
Posted by barbour outlet at 2014年11月15日 17:17