在創建的虛擬環境中安裝cookiecutter
$VENV/bin/pip install cookiecutter
$ $ENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch
project_name [Pyramid Scaffold]: project_name
repo_name [project_name]:
Select template_language:
1 - jinja2
2 - chameleon
3 - mako
Choose from 1, 2, 3 [1]:
Select backend:
1 - none
2 - sqlalchemy
3 - zodb
Choose from 1, 2, 3 [1]:
切換到項目所在目錄,執行以下命令
cd project_name
$ENV/bin/pip install --upgrade pip setuptools
$ENV/bin/pip install -e ".[testing]"
(pyramid)
啓動項目
$ENV/bin/pserve development.ini --reload
Starting monitor for PID 45651.
Starting server in PID 45651.
Serving on http://localhost:6543
Serving on http://localhost:6543
使用瀏覽器打開http://localhost:6543即可訪問