AlterEgo
old web2py blog
Useful Links
List all entries
Book
Interactive Examples
F.A.Q.
Free Applications
Plugins
Recipes
Demo of Admin Interface
Semantic web extension
Some of the information here may be outdated, please check the book instead
Edit page
Title:
Security Code:
Body:
(use
this
wiki markup)
To setup web2py on a Debian based machine (like Ubuntu for example) you do sudo apt-get -y install python sudo apt-get -y install postgresql8.1 sudo apt-get -y install python-psycopg2 sudo apt-get -y install unzip wget http://mdp.cti.depaul.edu/examples/static/web2py_src.zip unzip web2py_src.zip cd web2py python web2py.py -a yourpassword -i 127.0.0.1 -p 8000 then open a browser and visit 127.0.0.1:8000 At this point you are still using sqlite but postgresql is running in background. To use postgresql: sudo -u postgres createuser -P -s -e [yourusername] createdb [yourdbname] and in your web2py models replace db=SQLDB('sqlite://db.db') with db=SQLDB('postgres://[yourusername]:[yourpassword]@localhost:5432/[yourdbname]') and everything should work. Mind that some table names and field names are allowed in sqlite but not in postgresql and vice versa.
© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by
web2py
- design derived from a theme by
the earlybird
The content of this book is released under the
Artistic License 2.0
- Modified content cannot be reproduced.