Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
39d4117
commit b244318
Showing
1 changed file
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,23 @@ | ||
--- | ||
layout: default | ||
title: upgrade to point2 | ||
title: Upgrade to web.py 0.2 | ||
--- | ||
|
||
# upgrade to point2 | ||
# Upgrade to web.py 0.2 | ||
|
||
If you are migrating form the "one big file" version of web.py to the .2 version, you have to make some changed to your code. | ||
|
||
### web.run() | ||
|
||
Most importantly, thanks to Guido, change the run line from: | ||
|
||
if __name__ == '__main__': web.run(urls, web.reloader) | ||
|
||
to: | ||
|
||
if __name__ == "__main__": web.run(urls, globals()) | ||
|
||
|
||
### web.config | ||
|
||
If you use a db, change `web.db_parameters` and `web.db_printing` to `web.config.db_paramters` and `web.config.db_printing` respectively. |