From 54d98f58f36b2681c7253dad76f87b72b65348a4 Mon Sep 17 00:00:00 2001 From: Philip Sargent <philip.sargent@klebos.com> Date: Wed, 14 Apr 2021 01:52:42 +0100 Subject: [PATCH] docum and defaults in template cave-data xml --- templates/dataformat/cave.xml | 19 ++++++++++--------- templates/dataformat/entrance.xml | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/templates/dataformat/cave.xml b/templates/dataformat/cave.xml index a00b9ba..c1ad01b 100644 --- a/templates/dataformat/cave.xml +++ b/templates/dataformat/cave.xml @@ -2,6 +2,7 @@ <!-- This file is generated using the form documented at /handbook/survey/caveentry.html --> <!-- Only put one cave in this file --> <!-- If you edit this file by hand, make sure you update the database by doing a full data import --> +<!-- ALTERNATIVELY you can download an example template from expoweb/templates/cave_data.html --> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> @@ -9,12 +10,12 @@ <body> <cave> <non_public>{{ cave.non_public }}</non_public>{% for slug in cave.caveslug_set.all %} -<caveslug>{{ slug.slug|default_if_none:""|safe }}</caveslug>{% endfor %} -<official_name>{{ cave.official_name|default_if_none:""|safe }}</official_name>{% for area in cave.area.all %} +<caveslug>{{ slug.slug|default_if_none:"1623-000"|safe }}</caveslug>{% endfor %} +<official_name>{{ cave.official_name|default_if_none:""|safe }}</official_name><!-- Use ü for u+Umlaut and ö for o+umlaut eg Höhle for Hohle and Glück for Gluck-->{% for area in cave.area.all %} <area>{{ area.short_name|default_if_none:""|safe }}</area>{% endfor %} <kataster_code>{{ cave.kataster_code|default_if_none:""|safe }}</kataster_code> <kataster_number>{{ cave.kataster_number|default_if_none:""|safe }}</kataster_number> -<unofficial_number>{{ cave.unofficial_number|default_if_none:""|safe }}</unofficial_number> +<unofficial_number>{{ cave.unofficial_number|default_if_none:"2020-XX-01"|safe }}</unofficial_number> {% for ce in cave.entrances.all %} <entrance> <entranceslug>{{ ce.entrance.slug|default_if_none:""|safe }}</entranceslug> @@ -24,17 +25,17 @@ <explorers>{{ cave.explorers|default_if_none:""|safe }}</explorers> <underground_description>{{ cave.underground_description|default_if_none:""|safe }}</underground_description> <equipment>{{ cave.equipment|default_if_none:""|safe }}</equipment> -<references>{{ cave.references|default_if_none:""|safe }}</references> -<survey>{{ cave.survey|default_if_none:""|safe }}</survey> +<references>{{ cave.references|default_if_none:""|safe }}</references><!-- References to documentation. Could be Journal articles or Logbook entries. Can be links if the docs are online. --> +<survey>{{ cave.survey|default_if_none:""|safe }}</survey><!-- Drawn-up surveys. Scans of paper surveys or images/PDFs of electronic surveys. Should include HTML to display current plan and elevation, with links to larger versions (See section on URLs and files). Could list links to multiple years of survey, or even a separate survey page if it's complicated enough. --> <kataster_status>{{ cave.kataster_status|default_if_none:""|safe }}</kataster_status> <underground_centre_line>{{ cave.underground_centre_line|default_if_none:""|safe }}</underground_centre_line> -<notes>{{ cave.notes|default_if_none:""|safe }}</notes> +<notes>{{ cave.notes|default_if_none:""|safe }}</notes><!-- Normally empty, but place for anything else that should be noted, such as info on cave maybe being a duplicate, or lost --> <length>{{ cave.length|default_if_none:""|safe }}</length> <depth>{{ cave.depth|default_if_none:""|safe }}</depth> <extent>{{cave.extent|default_if_none:""|safe }}</extent> -<survex_file>{{ cave.survex_file|default_if_none:""|safe }}</survex_file> -<description_file>{{ cave.description_file|default_if_none:""|safe }}</description_file> -<url>{{ cave.url|default_if_none:""|safe }}</url> +<survex_file>{{ cave.survex_file|default_if_none:"caves-1623/000/000.svx"|safe }}</survex_file> +<description_file>{{ cave.description_file|default_if_none:""|safe }}</description_file><!-- Leave BLANK if this is the only description is in this form --> +<url>{{ cave.url|default_if_none:"1623/000"|safe }}</url> </cave> </body> </html> diff --git a/templates/dataformat/entrance.xml b/templates/dataformat/entrance.xml index 2ff9f6a..eb6b45a 100644 --- a/templates/dataformat/entrance.xml +++ b/templates/dataformat/entrance.xml @@ -17,7 +17,7 @@ <location_description>{{ entrance.location_description|default_if_none:""|safe }}</location_description> <approach>{{ entrance.approach|default_if_none:""|safe }}</approach> <underground_description>{{ entrance.underground_description|default_if_none:""|safe }}</underground_description> -<photo>{{ entrance.photo|default_if_none:""|safe }}</photo> +<photo>{{ entrance.photo|default_if_none:"<img src='/1623/000/000.jpg' />"|safe }}</photo> <!-- marking options: P = Paint, P? = Paint (?), T = Tag,