Learning Pyramid: 1// Installation

02 06 2011

Use virtualenv and virtualenvwrapper.

Put this into ~/.bashrc

# virtualenv
export WORKON_HOME=$HOME/myprojects
source /etc/bash_completion.d/virtualenvwrapper

Create a virtual environment with

mkvirtualenv $ENV
workon $ENV

Install Pyramid and other eggs:

pip install --upgrade distribute
pip install pyramid
pip install pyramid_openid pyramid_beaker

Create a Pyramid project

# Traversal, no DB
bin/paster create -t pyramid_starter $PROJECT
which python # check whether virtualenv is correctly installed
which paster
python setup.py develop # create development environment
# Run tests
python setup.py test -q
pip install nose coverage
nosetests --cover-package=$PROJECT --cover-erase --with-coverage

Start server:

paster serve development.ini --reload

Use the menu below to choose a header image. You can choose between images included with the theme or use a custom image.

If you are using both sidebars and you want to use an included image then choose one ending with "_large.jpg". For ex: red_sky_large.jpg instead of red_sky.jpg

To choose a custom image, select "custom header path" from the menu list and then click on the "media library" link. A custom header image must be 780x95 in size if you are using only one sidebar or 1000x95 if you are using both sidebars.

Please choose a header image: OUT ); define("FRESHY_CUSTOM_HEADER","Custom header path:"); define("FRESHY_HOMELINK_DESCRIPTION","Enter a custom label for the link pointing to your blog front page: "); define("FRESHY_NAVLINK_TITLE","Navigation link "); define("FRESHY_NAVLINK_DESCRIPTION_URL","Enter URL for Navigation link "); define("FRESHY_NAVLINK_ANCHOR_TEXT","Enter label for Navigation link "); define("FRESHY_NAVBG_TITLE","Navigation highlight colour"); define("FRESHY_NAVBG_DESCRIPTION","Please choose a navigation button highlight colour for this theme: "); define("FRESHY_NAVBG_GREEN","Green"); define("FRESHY_NAVBG_RED","Red"); define("FRESHY_NAVBG_LIGHT_BLUE","Light Blue"); define("FRESHY_NAVBG_BLUE","Blue"); define("FRESHY_NAVBG_PURPLE","Purple"); define("FRESHY_NAVBG_GRAY","Gray"); define("FRESHY_NAVBG_ORANGE","Orange"); define("FRESHY_NAVLINK_HOME","Home"); //only used for s9y versions <1.1 ?>