I have a plugin for my users which allow them to create a spatial view for different layers. I have define a set of styles fitting the display I want to give. I would like to define these styles to the view automatically every-time a new view is created. I am currently using QGIS 2.14, PostGIS 2.3, PostgreSQL 9.5 and Python 3 with the psycopg2 library.
I thought about simply populating the layer_style table in the database, but without success.
Does anyone know how to do so ?