Skip to content
Newer
Older
100644 69 lines (54 sloc) 1.38 KB
089a01a web.py 0.2
aaronsw authored May 20, 2006
1 #!/usr/bin/env python
20205cf move up __future__ import for compatibility. tx Alberto Bertogli
aaronsw authored Nov 1, 2006
2 from __future__ import generators
3
089a01a web.py 0.2
aaronsw authored May 20, 2006
4 """web.py: makes web apps (http://webpy.org)"""
056917b updated __version__ to 0.3
Anand authored Mar 21, 2008
5 __version__ = "0.3"
6298b30 set svn:keywords property to automatially replace $Rev$.
anand authored Mar 1, 2007
6 __revision__ = "$Rev$"
089a01a web.py 0.2
aaronsw authored May 20, 2006
7 __author__ = "Aaron Swartz <me@aaronsw.com>"
8 __license__ = "public domain"
9 __contributors__ = "see http://webpy.org/changes"
10
11 # todo:
12 # - some sort of accounts system
13
ede0dcc remove references to request.py from __init__.py
Anand authored Jul 1, 2008
14 import utils, db, net, wsgi, http, webapi, httpserver, debugerror
cbb981e integrate template better, move in form
aaronsw authored May 23, 2006
15 import template, form
9a31faa @anandology support return instead of print
anandology authored Sep 20, 2007
16
d2d62c1 @anandology New session module (tx Devi).
anandology authored Feb 18, 2008
17 import session
55adf3a integrate template
aaronsw authored May 23, 2006
18
089a01a web.py 0.2
aaronsw authored May 20, 2006
19 from utils import *
20 from db import *
21 from net import *
6974b25 oops, forgot to import wsgi
aaronsw authored May 20, 2006
22 from wsgi import *
17f16d1 correct placement of wsgi
aaronsw authored May 20, 2006
23 from http import *
089a01a web.py 0.2
aaronsw authored May 20, 2006
24 from webapi import *
d700e16 get rid of the old web.py
aaronsw authored May 20, 2006
25 from httpserver import *
4249032 move errors into web.py instead of the server; fix bug with ors in te…
aaronsw authored May 28, 2006
26 from debugerror import *
502ab67 web.application module
anand authored Sep 12, 2007
27 from application import *
53ec797 only import if openid module is around
Aaron Swartz authored Apr 23, 2008
28 try:
29 import webopenid as openid
30 except ImportError:
31 pass # requires openid module
089a01a web.py 0.2
aaronsw authored May 20, 2006
32
33 try:
55adf3a integrate template
aaronsw authored May 23, 2006
34 import cheetah
089a01a web.py 0.2
aaronsw authored May 20, 2006
35 from cheetah import *
36 except ImportError:
37 pass
38
39 def main():
40 import doctest
41
42 doctest.testmod(utils)
43 doctest.testmod(db)
44 doctest.testmod(net)
6974b25 oops, forgot to import wsgi
aaronsw authored May 20, 2006
45 doctest.testmod(wsgi)
17f16d1 correct placement of wsgi
aaronsw authored May 20, 2006
46 doctest.testmod(http)
089a01a web.py 0.2
aaronsw authored May 20, 2006
47 doctest.testmod(webapi)
48
49 try:
50 doctest.testmod(cheetah)
55adf3a integrate template
aaronsw authored May 23, 2006
51 except NameError:
eb13caa cheetah test goof caught by paulc
aaronsw authored May 21, 2006
52 pass
089a01a web.py 0.2
aaronsw authored May 20, 2006
53
14abe3e clean up template.py, add unit tests
aaronsw authored May 28, 2006
54 template.test()
55
089a01a web.py 0.2
aaronsw authored May 20, 2006
56 import sys
57 urls = ('/web.py', 'source')
58 class source:
59 def GET(self):
60 header('Content-Type', 'text/python')
7662403 update __init__ app to 0.3
Aaron Swartz authored Apr 20, 2008
61 return open(sys.argv[0]).read()
089a01a web.py 0.2
aaronsw authored May 20, 2006
62
63 if listget(sys.argv, 1) != 'test':
7662403 update __init__ app to 0.3
Aaron Swartz authored Apr 20, 2008
64 app = application(urls, locals())
65 app.run()
089a01a web.py 0.2
aaronsw authored May 20, 2006
66
60aa853 cheetah test goof caught by paulc
aaronsw authored May 21, 2006
67 if __name__ == "__main__": main()
0b56731 dummy change to update revision
anand authored Aug 23, 2007
68
Something went wrong with that request. Please try again.