This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from odoo import models, fields, api | |
| from json_field import JsonField | |
| class Person(models.Model): | |
| _name = 'example.person' | |
| _description = 'Person with json details' | |
| details = JsonField() # a json object represented as dict / list / python primitives |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [options] | |
| # | |
| # WARNING: | |
| # If you use the Odoo Database utility to change the master password be aware | |
| # that the formatting of this file WILL be LOST! A copy of this file named | |
| # /etc/odoo/openerp-server.conf.template has been made in case this happens | |
| # Note that the copy does not have any first boot changes | |
| #----------------------------------------------------------------------------- | |
| # Odoo Server Config File - TurnKey Linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit) | |
| # updated to PostGIS 2.0.1 | |
| # basics | |
| apt-get install python-software-properties | |
| apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.3 | |
| # install the following pacakages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # First, clear out any old mapnik or node.js installs that might conflict | |
| sudo apt-get purge libmapnik libmapnik-dev mapnik-utils nodejs | |
| # Also clear out any old ppa's that might conflict | |
| sudo rm /etc/apt/sources.list.d/*mapnik* | |
| sudo rm /etc/apt/sources.list.d/*developmentseed* | |
| sudo rm /etc/apt/sources.list.d/*chris-lea* | |
| # add new ppa's | |
| echo 'yes' | sudo apt-add-repository ppa:chris-lea/node.js |