Files
rogaining_srv/templates/admin/location2025/upload_csv.html
2025-08-31 10:01:42 +09:00

98 lines
4.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "admin/base_site.html" %}
{% load i18n admin_urls %}
{% block content %}
<h1>チェックポイントCSVアップロード</h1>
{% if user.is_staff %}
<div class="messagelist">
<div class="info">
<strong>スタッフユーザー:</strong> 全ステータスdraft, private, publicのイベントが表示されます。
</div>
</div>
{% else %}
<div class="messagelist">
<div class="info">
<strong>一般ユーザー:</strong> publicステータスのイベントのみが表示されます。
</div>
</div>
{% endif %}
<div class="module">
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="form-row">
<div>
<label for="event">対象イベント:</label>
<select name="event" required>
<option value="">-- イベントを選択 --</option>
{% for event in events %}
<option value="{{ event.id }}">{{ event.event_name }} ({{ event.status }})</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-row">
<div>
<label for="csv_file">CSVファイル:</label>
<input type="file" name="csv_file" accept=".csv" required>
</div>
</div>
<div class="submit-row">
<input type="submit" value="アップロード" class="default">
<a href="../" class="button">キャンセル</a>
</div>
</form>
</div>
<div class="module">
<h2>CSVフォーマット</h2>
<p>以下の形式でCSVファイルを作成してください</p>
<pre>
cp_number,cp_name,latitude,longitude,cp_point,photo_point,buy_point,address,phone,description,sub_loc_id,subcategory,photos,videos,tags,evaluation_value,remark,hidden_location
1,岐阜駅前,35.4091,136.7581,10,0,0,岐阜県岐阜市橋本町1-10-1,058-123-4567,JR岐阜駅前広場,#1(10),交通,IMG_001.JPG,,駅を背景に撮影,50,岐阜市の中心駅です,false
2,岐阜城,35.4329,136.7817,15,5,0,岐阜県岐阜市金華山天守閣18,058-263-4853,金華山の頂上にある歴史ある城,#2(20),史跡,IMG_002.JPG,VID_001.MP4,城と景色を撮影,85,織田信長ゆかりの名城,false
</pre>
<h3>項目説明</h3>
<ul>
<li><strong>cp_number</strong>: チェックポイント番号(必須、整数)</li>
<li><strong>cp_name</strong>: チェックポイント名(必須)</li>
<li><strong>latitude</strong>: 緯度(必須、小数点形式)</li>
<li><strong>longitude</strong>: 経度(必須、小数点形式)</li>
<li><strong>cp_point</strong>: 基本ポイント(デフォルト: 10</li>
<li><strong>photo_point</strong>: 写真ポイント(デフォルト: 0</li>
<li><strong>buy_point</strong>: 買い物ポイント(デフォルト: 0</li>
<li><strong>address</strong>: 住所(任意)</li>
<li><strong>phone</strong>: 電話番号(任意)</li>
<li><strong>description</strong>: 基本説明(任意)</li>
<li><strong>sub_loc_id</strong>: サブロケーションID任意、例: #1(10)</li>
<li><strong>subcategory</strong>: サブカテゴリ(任意、例: 史跡、観光名所、神社など)</li>
<li><strong>photos</strong>: 写真ファイル名(任意、複数の場合はカンマ区切り)</li>
<li><strong>videos</strong>: 動画ファイル名(任意、複数の場合はカンマ区切り)</li>
<li><strong>tags</strong>: 撮影タグ(任意、例: 建物を背景に撮影)</li>
<li><strong>evaluation_value</strong>: 評価値(任意、数値)</li>
<li><strong>remark</strong>: 詳細説明(任意、長文可)</li>
<li><strong>hidden_location</strong>: 隠しロケーションtrue/false、デフォルト: false</li>
</ul>
<div class="help">
<h4>📝 新フィールドの使用例</h4>
<ul>
<li><strong>sub_loc_id</strong>: "#CP001(50)" - CP番号とポイントの組み合わせ</li>
<li><strong>subcategory</strong>: "史跡", "観光名所", "神社", "グルメ", "自然" など</li>
<li><strong>photos</strong>: "IMG_001.JPG,IMG_002.JPG" - 複数ファイルはカンマ区切り</li>
<li><strong>videos</strong>: "VID_001.MP4" - 動画ファイル名</li>
<li><strong>tags</strong>: "建物を背景に撮影", "看板と一緒に" など撮影指示</li>
<li><strong>evaluation_value</strong>: "85" - 0-100の数値評価</li>
<li><strong>remark</strong>: 詳細な歴史的背景や訪問時の注意事項など</li>
<li><strong>hidden_location</strong>: "true" - 一般公開しない特別なロケーション</li>
</ul>
</div>
</div>
{% endblock %}