Make postgis support really optional including insensitive menu
items.
* Thuban/Model/postgisdb.py (has_postgis_support): New. Return
whether the postgis is supported.
* Thuban/UI/dbdialog.py: Put the psycopg import into try..except
to make postgis support optional
* Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
version of Thuban.Model.postgisdb.has_postgis_support
(database_management command): Make it only sensitive if postgis
is supported.
|