Skip to content
Newer
Older
100644 58 lines (31 sloc) 1.21 KB
39d4117 kailoa
anonymous authored Sep 4, 2006
1 ---
2 layout: default
b244318 kailoa
anonymous authored Sep 4, 2006
3 title: Upgrade to web.py 0.2
39d4117 kailoa
anonymous authored Sep 4, 2006
4 ---
5
b244318 kailoa
anonymous authored Sep 4, 2006
6 # Upgrade to web.py 0.2
39d4117 kailoa
anonymous authored Sep 4, 2006
7
85bd75d Quash
anonymous authored Oct 7, 2006
8 If you are migrating from the "one big file" version of web.py to the .2 version, you have to make some changes to your code.
7689235 kailoa
anonymous authored Oct 2, 2006
9
10
11 ### Downloading web.py 0.2
12
13 From the command line, cd to the directory you wish to install web.py and run the following command:
14
15 svn export http://webpy.org/svn/trunk/web/
b244318 kailoa
anonymous authored Sep 4, 2006
16
1d70da6 rouadec
anonymous authored Oct 4, 2006
17 Remove web.py and web.pyc from the loadpath.
18
b244318 kailoa
anonymous authored Sep 4, 2006
19 ### web.run()
20
7689235 kailoa
anonymous authored Oct 2, 2006
21 Most importantly, upvars() was removed. We have to change the run line from:
b244318 kailoa
anonymous authored Sep 4, 2006
22
64b32cd kailoa
anonymous authored Sep 4, 2006
23 if __name__ == '__main__': web.run(urls)
b244318 kailoa
anonymous authored Sep 4, 2006
24
25 to:
26
64b32cd kailoa
anonymous authored Sep 4, 2006
27 if __name__ == "__main__": web.run(urls, globals())
b244318 kailoa
anonymous authored Sep 4, 2006
28
29
30 ### web.config
31
32 If you use a db, change `web.db_parameters` and `web.db_printing` to `web.config.db_paramters` and `web.config.db_printing` respectively.
64b32cd kailoa
anonymous authored Sep 4, 2006
33
34
b962951 ionrock
anonymous authored Oct 2, 2006
35 ### debugging
64b32cd kailoa
anonymous authored Sep 4, 2006
36
37 web.py 0.1:
38
39 web.internalerror = web.debugerror
40 if __name__ == '__main__': web.run(urls, web.reloader)
41
42 web.py 0.2
43
44 web.webapi.internalerror = web.debugerror
45 if __name__ == "__main__": web.run(urls, globals(), web.reloader)
cdcceef rouadec
anonymous authored Oct 4, 2006
46
47 ### fastcgi with apache
48
49 web.py 0.1:
50
51 web.runwsgi = web.runfcgi
52
53 web.py 0.2:
54
55 def runfcgi_apache(func):
56 web.wsgi.runfcgi(func, None)
57
58 web.wsgi.runwsgi = runfcgi_apache
Something went wrong with that request. Please try again.