File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -364,6 +364,33 @@ Wikipedia:[https://en.wikipedia.org/wiki/TurboGears 英文]、[https://zh.wiki
364
364
365
365
又一个重型的 Web 开发框架,名气仅次于 Django。
366
366
367
+ <h4>web.py</h4>
368
+
369
+ Home:[http://webpy.org/]
370
+
371
+ 与前两个(Django、TurboGears)不同,这是一个轻量级的框架。甚至被称为“It's the anti-framework framework.”
372
+
373
+ 其作者是大名鼎鼎的黑客 [https://en.wikipedia.org/wiki/Aaron_Swartz Aaron Swartz ]。(俺在[http://program-think.blogspot.nl/2013/01/weekly-share-37.html 某篇博文 ]中悼念过他)。
374
+
375
+ 当年 Aaron Swartz 用 web.py 来搭建同样大名鼎鼎的网站 [https://en.wikipedia.org/wiki/Reddit reddit ](该网站是 Web 2.0 的标杆)。
376
+
377
+ 代码示例——Hello world
378
+ <source lang="python">
379
+ import web
380
+
381
+ urls = (
382
+ "/", "index"
383
+ )
384
+
385
+ class index:
386
+ def GET(self):
387
+ return "Hello, world!"
388
+
389
+ if __name__ == "__main__" :
390
+ app = web.application(urls, globals())
391
+ app.run()
392
+ </source>
393
+
367
394
== 4.4 Web前端 & JS整合 ==
368
395
369
396
<h4>Pyjamas & pyjs</h4>
You can’t perform that action at this time.
0 commit comments