I would like to ask if someone knows a way to press the "select all" button in Project>Properties>QGIS Server>WFS capabilities using python, or if is there a specific command to do the same thing.
Asked
Active
Viewed 75 times
1 Answers
1
Try the following
vectorLayers = [layer.id() for layer in QgsProject.instance().mapLayers().values() if isinstance(layer, QgsVectorLayer)]
QgsProject.instance().writeEntry( "WFSLayers" , "/", vectorLayers);
QgsProject.instance().write()
Adapted from my previous answer Publishing a layer as WFS with PyQGIS
ThomasG77
- 30,725
- 1
- 53
- 93
-
It works perfectly, thanks a lot! – Pivi Aug 04 '20 at 09:15