Skip to content

Instantly share code, notes, and snippets.

@romanlv
romanlv / gist:91195b41087ba2d94eee
Last active February 7, 2019 10:47 — forked from aht/gist:5097702
ansible postgres playbook with PostGIS 2.1 on Ubuntu 14.04, setting up postgis_template and creating databases from this postgis_template
---
# packages.yml
- name: Add postgres repository
apt_repository: repo='deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main' state=present
- name: Add postgres repository key
apt_key: url=http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc state=present
@romanlv
romanlv / inheritance_tests.py
Created December 21, 2012 17:23 — forked from anonymous/inheritance_tests.py
Unit test to reproduce a problem with mongoengine inheritance. I need to save instances of child class in different collection, and have no idea how to do it.
#mongoengine==0.7.8
from django.test import TestCase
import mongoengine as me
class TestCollectionNameInheritance(TestCase):
def test_simple_case(self):
class BasicUser(me.Document):
username=me.StringField(required=True, unique=True)
meta = {