CUCC Expedition Handbook

Handbook Troggle JSON

We can export cave and expo data with Django templates that generate JSON, which is what CUYC do (and we have access to their code). We already have a proof of principle JSON export API working at expo.survex.com/api/expeditions_json and we also have a text-format export as TSV (tab-separated values), which are like comma-separated values and similarly importable into spreadsheets.

Expoadmin method

Log in as 'expoadmin' (password: 'beery:cavey') at /admin/login/ then look at the entries for any one of the objects: Caves, Expeditions, People etc.

In the top left-hand corner is a drop-down menu, 'export as json' is shown selected in the image. Select one or more of the objects listed and press the 'Go' button next to the drop-down menu. A JSON-formatted file will be produced 'troggle-ouput.json' in the troggle installation directory (where the troggle code .git file is).

There is also an 'export as XML' option.

The code which adds this capability into the Troggle Administration control panel is in troggle/core/admin.py.


Go on to: Troggle architecture
Return to: Troggle in 2025-2030
Troggle index: Index of all troggle documents