camptocamp/c2cgeoportal — pull request #671 by asaunier (2013-08-28 12:30:32+00:00)
Title: Layer attribute values enumeration service

Prototype/demo for a webservice listing the values of a given attribute from a given layer (useful in the QueryBuilder plugin to build combos in the condition panels).

This require in the project part to:

- list the DBSession objects created in the project. For instance:
```
# in /models.py
from c2cgeoportal.models import DBSessions
DBSessions.update({
'dbsession2': DBSession2,
'dbsession3': DBSession3,
'dbsession4': DBSession4,
'dbsession5': DBSession5,
'dbsession6': DBSession6,
'dbsession7': DBSession7,
'dbsession8': DBSession8,
'dbsession9': DBSession9,
})
```

- configure the layer/attribute info in the main ``config.yaml.in``. For instance:
```
# Querier combos config
layers_enum:
areal_liegenschaften:
dbsession: 'dbsession7'
attributes:
gemeinde:
table: 'np_areal.v_p_areal_liegenschaften'
fieldname: 'gemeinde'
```