62 lines
2.5 KiB
HTML
62 lines
2.5 KiB
HTML
{% extends "admin/base_site.html" %}
|
||
{% load i18n admin_urls %}
|
||
|
||
{% block content %}
|
||
<h1>チェックポイントCSVアップロード</h1>
|
||
|
||
<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 }}</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
|
||
1,岐阜駅前,35.4091,136.7581,10,0,0,岐阜県岐阜市橋本町1-10-1,058-123-4567,JR岐阜駅前広場
|
||
2,岐阜城,35.4329,136.7817,15,5,0,岐阜県岐阜市金華山天守閣18,058-263-4853,金華山の頂上にある歴史ある城
|
||
</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>
|
||
</ul>
|
||
</div>
|
||
|
||
{% endblock %}
|