Using different versions of web2py

This chapter assumes you installed web2py from source and therefore have web2py itself under version control using Git.

Rolling back to a different web2py version

You can find a list of web2py releases on Github.

What if for some cockamamie reason you upgrade web2py and there's a problem? You can use git's versioning to roll back to an earlier version easily. Just go into the web2py directory and use git checkout with the version you have in mind. For example, if you wanted to roll back to version 2.9.10, you'd do this:

# This assumes you've done an initial git clone.
# Go to the web2py directory
$ cd /usr/local/web2py
$ sudo git checkout R-2.9.10

You'll see some output like this:

Previous HEAD position was b9ee4d4... R-2.12.2
HEAD is now at 2b50cf2... R-2.9.10

Get current version of web2py from the command line

Check the current version of web2py just to be sure. This displays the version number and exits immediately, without starting up the server:

$ python web2py.py --version

And the version information is displayed:

Version 2.9.10-stable+timestamp.2014.09.15.08.05.10

Restoring the latest version of web2py

To return to the latest verson of web2py, you don't need to know its version number. Just git checkout master:

$ sudo git checkout master

results matching ""

    No results matching ""