使用cookiecutter創建pyramid項目

在創建的虛擬環境中安裝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即可訪問

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章