Difference between revisions of "Pyramid"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) |
Rafahsolis (talk | contribs) |
||
| Line 1: | Line 1: | ||
Pyramid with postgresql and SQLAlchemy<br /> | Pyramid with postgresql and SQLAlchemy<br /> | ||
Requirements | Requirements | ||
| + | * Pip | ||
* PostgreSQL | * PostgreSQL | ||
| + | * Virtualenv (optional VirtualenvWrapper) | ||
| + | * SQLAlchemy (sudo apt-get install python-dev && pip install SQLAlchemy) | ||
| + | == Install == | ||
| + | easy_install "pyramid==1.6.1" | ||
| + | or | ||
| + | sudo apt-get install python-pyramid | ||
| + | |||
| + | == Create proyect == | ||
| + | pcreate --list # shows options | ||
| + | pcreate -s alchemy indeed | ||
| + | == run development server == | ||
| + | pserve development.ini | ||
== Postgresql database config == | == Postgresql database config == | ||
in production.ini and development.in set: | in production.ini and development.in set: | ||
sqlalchemy.url = postgresql://user:password@host/indeed | sqlalchemy.url = postgresql://user:password@host/indeed | ||
| + | |||
| + | == Migrations == | ||
| + | from project folder: | ||
| + | initialize_proyectname_db | ||
Revision as of 19:27, 13 February 2016
Pyramid with postgresql and SQLAlchemy
Requirements
- Pip
- PostgreSQL
- Virtualenv (optional VirtualenvWrapper)
- SQLAlchemy (sudo apt-get install python-dev && pip install SQLAlchemy)
Install
easy_install "pyramid==1.6.1"
or
sudo apt-get install python-pyramid
Create proyect
pcreate --list # shows options pcreate -s alchemy indeed
run development server
pserve development.ini
Postgresql database config
in production.ini and development.in set:
sqlalchemy.url = postgresql://user:password@host/indeed
Migrations
from project folder:
initialize_proyectname_db