Left: | ||
Right: |
LEFT | RIGHT |
---|---|
(no file at all) | |
1 # This file is part of trytond_backend_gis. The COPYRIGHT file at the top | |
2 # level of this repository contains the full copyright notices and license | |
3 # terms. | |
4 from trytond.backend.postgresql.database import Database as PGDatabase | |
5 | |
6 try: | |
7 import dbgis | |
8 except ImportError: | |
9 dbgis = None | |
ced
2017/05/19 16:23:25
I find it strange that it can work the same withou
| |
10 | |
11 | |
12 class Database(PGDatabase): | |
13 | |
14 def get_connection(self, autocommit=False, readonly=False): | |
15 connection = super(Database, self).get_connection(autocommit, readonly) | |
ced
2017/05/19 16:23:25
Use keyworded values, it is safer in case of chang
nicoe
2017/06/25 19:58:36
Done.
| |
16 if dbgis is not None: | |
17 dbgis.register_psycopg(connection, connection) | |
18 return connection | |
LEFT | RIGHT |