Web2Py

Differences between revisions 3 and 5 (spanning 2 versions)
Revision 3 as of 2010-05-11 12:33:17
Size: 518
Editor: 158
Comment:
Revision 5 as of 2010-05-11 13:10:26
Size: 1834
Editor: 158
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
0. Download [[http://www.web2py.com/examples/static/web2py_src.zip|web2py_src.zip]].   0. Download [[http://www.web2py.com/examples/static/web2py_src.zip|web2py_src.zip]].
  0. Open a terminal and run the following commands:
    * {{{$ mkdir lib}}}
    * {{{$ mkdir lib/python}}}
    * {{{$ mkdir bin}}}
  0. Add the following to the bottom of your `.bashrc` file: {{{
      PYTHONPATH=$HOME/lib/python

      export PYTHONPATH}}}
  0. Log out and log back in to allow the new `bin` directory and `PYTHONPATH` to take effect.
  0. Unzip the `web2py_src.zip` file (generating the `web2py` directory), and move `web2py` to your `lib/python` directory.
  0. Create a file named `web2py` in your `bin` directory with the following contents: {{{
      #!/usr/bin/env sh

      cd $HOME/lib/python/web2py
      python web2py.py}}}
     Run {{{$ chmod +x web2py}} to make this shell script executable.
  0. Run the following command from the terminal to install the `python-tk` package:
    * {{{$ sudo aptitude install python-tk}}}
  0. Add a launcher to your top desktop panel:
    * Right mouse click on the panel.
    * Click `Add to Panel`.
    * Click `Custom Application Launcher`.
    * Click `Add`.
    * Set *Name:* to `web2py`.
    * Set *Command:* to `web2py`.
    * Optionally, set the icon to `lib/python/web2py/applications/examples/static/web2py_logo.png`.
    * Click `Add`.

You should now be able to launch `web2py` by clicking on the launcher.

web2py is described on the web site as a "free and open source full-stack enterprise framework for agile development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python." I've begun reading the web2py book so that I can use it in my classroom.

This describes how I installed and setup web2py in my home directory.

  1. Download web2py_src.zip.

  2. Open a terminal and run the following commands:
    • $ mkdir lib

    • $ mkdir lib/python

    • $ mkdir bin

  3. Add the following to the bottom of your .bashrc file:

          PYTHONPATH=$HOME/lib/python
    
          export PYTHONPATH
  4. Log out and log back in to allow the new bin directory and PYTHONPATH to take effect.

  5. Unzip the web2py_src.zip file (generating the web2py directory), and move web2py to your lib/python directory.

  6. Create a file named web2py in your bin directory with the following contents:

          #!/usr/bin/env sh
    
          cd $HOME/lib/python/web2py
          python web2py.py
    • Run {$ chmod +x web2py to make this shell script executable.

  7. Run the following command from the terminal to install the python-tk package:

    • $ sudo aptitude install python-tk

  8. Add a launcher to your top desktop panel:
    • Right mouse click on the panel.
    • Click Add to Panel.

    • Click Custom Application Launcher.

    • Click Add.

    • Set *Name:* to web2py.

    • Set *Command:* to web2py.

    • Optionally, set the icon to lib/python/web2py/applications/examples/static/web2py_logo.png.

    • Click Add.

You should now be able to launch web2py by clicking on the launcher.

Web2Py (last edited 2010-05-11 15:39:26 by 158)