Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| tips:pyramid [2015/06/12 10:41] – scipio | tips:pyramid [2015/08/18 12:32] (current) – [yml] scipio | ||
|---|---|---|---|
| Line 37: | Line 37: | ||
| </ | </ | ||
| + | ===== bower ===== | ||
| + | |||
| + | Bower can help to install javascript client side libraries, like angularjs. | ||
| + | |||
| + | Install npm and bower at system level | ||
| + | < | ||
| + | sudo apt-get install npm | ||
| + | sudo npm install -g bower | ||
| + | </ | ||
| + | |||
| + | Install module (library) | ||
| + | < | ||
| + | # cd < | ||
| + | bower install angular-bootstrap | ||
| + | </ | ||
| + | |||
| + | Libraries: | ||
| + | * angular | ||
| + | * angular-bootstrap | ||
| + | * angular-wamp | ||
| + | * autobahn | ||
| + | * bootstrap | ||
| + | * jquery | ||
| + | * leafelet-bouncemarker | ||
| + | * leaflet | ||
| + | * Leaflet.label | ||
| + | |||
| + | In __init__.py | ||
| + | < | ||
| + | config.add_static_view(' | ||
| + | </ | ||
| + | |||
| + | In template | ||
| + | <code html> | ||
| + | <link href=" | ||
| + | <script src=" | ||
| + | <script src=" | ||
| + | <script src=" | ||
| + | </ | ||
| ===== aio ===== | ===== aio ===== | ||
| Line 68: | Line 107: | ||
| < | < | ||
| gunicorn --paste development.ini | gunicorn --paste development.ini | ||
| + | </ | ||
| + | |||
| + | ===== yaml ===== | ||
| + | |||
| + | Use yaml file as configuration container. See [[http:// | ||
| + | |||
| + | setup.py | ||
| + | < | ||
| + | requires = [ | ||
| + | ... | ||
| + | ' | ||
| + | .... | ||
| + | </ | ||
| + | |||
| + | __init__.py | ||
| + | < | ||
| + | config.include(' | ||
| + | </ | ||
| + | |||
| + | |||
| + | *ini | ||
| + | < | ||
| + | yaml.location = / | ||
| + | env = dev | ||
| + | </ | ||
| + | |||
| + | config.yml | ||
| + | < | ||
| + | configurator: | ||
| + | serial_code : ' | ||
| + | serial.port : '/ | ||
| + | serial.speed : 9600 | ||
| + | test.serial.port : '/ | ||
| + | test.serial.speed : 9600 | ||
| + | wamp.router.url : ' | ||
| + | wamp.router.push : ' | ||
| + | wamp.realm : ' | ||
| </ | </ | ||