介紹
By default 它是使用 pgsql 的
postgresql 安裝:
apt-get install postgresql
Homepage:
https://github.com/jzellman/webpy-skeleton
Usage:
mkdir myapp
cd myapp
git clone https://github.com/jzellman/webpy-skeleton.git .
Cloning into '.'... remote: Reusing existing pack: 103, done. remote: Total 103 (delta 0), reused 0 (delta 0) Receiving objects: 100% (103/103), 270.87 KiB | 157 KiB/s, done. Resolving deltas: 100% (26/26), done.
rm -rf .git
# 非必要
git init .
git add .
git commit -m 'Initial app setup.'
Initial Configuration
pip install -r requirements.txt
requirements.txt:
# Debian GNU/Linux 7 argparse==1.2.1 # python-argparse distribute==0.6.24 peewee==2.1.4 pep8==1.4.6 # pep8 ( Python PEP 8 code style checker ) psycopg2==2.5.1 # python-psycopg2 web.py==0.37 # python-webpy wsgiref==0.1.2
遇到問題:
Error: pg_config executable not found.
apt-get install python-psycopg2 <-- 將會安裝 libpq5 及 python-psycopg2
Running the web server
python app.py
console output:
Environment: development http://0.0.0.0:8080/
Running the tests
python test.py