|
|
|
@@ -131,13 +131,20 @@ names. The names come from the same dictionaries, so the lookup is exact.
|
|
|
|
|
|
|
|
|
|
### `/api/schools`
|
|
|
|
|
|
|
|
|
|
- `school_type`: if the value is a type group key, filter on
|
|
|
|
|
`school_type_group`. Otherwise filter on the raw label exactly as today, so
|
|
|
|
|
an old `?school_type=Community+school` link keeps working.
|
|
|
|
|
- `faith` (new, optional, `max_length=40`, sanitised like the others): filter to
|
|
|
|
|
rows whose `faith_groups` contains the key. An unknown key returns no
|
|
|
|
|
schools rather than being ignored, so a typo does not silently show
|
|
|
|
|
everything.
|
|
|
|
|
Both filters work on the name columns at request time. `_names_in_group`
|
|
|
|
|
collects the distinct `school_type` or `religious_denomination` names the
|
|
|
|
|
group accepts, once per distinct name rather than per row, and the rows are
|
|
|
|
|
kept with `isin`. No group column is stored.
|
|
|
|
|
|
|
|
|
|
- `school_type`: if the value is a type group key (any case), keep the rows
|
|
|
|
|
whose `school_type` name `type_group_for` puts in that group. Otherwise
|
|
|
|
|
filter on the raw label exactly as today, so an old
|
|
|
|
|
`?school_type=Community+school` link keeps working.
|
|
|
|
|
- `faith` (new, optional, `max_length=40`, sanitised like the others): keep the
|
|
|
|
|
rows whose `religious_denomination` name `faith_groups_for` puts in that
|
|
|
|
|
faith (any case); for `none`, rows with a missing name too. An unknown key
|
|
|
|
|
returns no schools rather than being ignored, so a typo does not silently
|
|
|
|
|
show everything.
|
|
|
|
|
|
|
|
|
|
### `/api/filters`
|
|
|
|
|
|
|
|
|
|