Convert Location to Location2025
This commit is contained in:
@ -7,7 +7,7 @@ pip install openpyxl
|
||||
# 既存のインポート部分に追加
|
||||
from rest_framework.decorators import api_view
|
||||
from django.http import HttpResponse, FileResponse
|
||||
from rog.models import Location, NewEvent2, Entry, GpsLog
|
||||
from rog.models import Location2025, NewEvent2, Entry, GpsLog
|
||||
import logging
|
||||
import openpyxl
|
||||
from openpyxl.styles import Font, Alignment, PatternFill, Border, Side
|
||||
@ -96,7 +96,7 @@ def get_scoreboard(request):
|
||||
# イベントのチェックポイント定義を取得
|
||||
cp_definitions = {}
|
||||
try:
|
||||
event_cps = Location.objects.filter(event=event)
|
||||
event_cps = Location2025.objects.filter(event_id=event.id)
|
||||
|
||||
for cp in event_cps:
|
||||
cp_definitions[cp.cp_number] = {
|
||||
@ -106,7 +106,7 @@ def get_scoreboard(request):
|
||||
'longitude': cp.longitude
|
||||
}
|
||||
except:
|
||||
# Locationモデルが存在しない場合
|
||||
# Location2025モデルが存在しない場合
|
||||
pass
|
||||
|
||||
# スタート・ゴール情報を取得
|
||||
@ -457,7 +457,7 @@ def download_scoreboard(request):
|
||||
# イベントのチェックポイント定義を取得
|
||||
cp_definitions = {}
|
||||
try:
|
||||
event_cps = Location.objects.filter(event=event)
|
||||
event_cps = Location2025.objects.filter(event_id=event.id)
|
||||
|
||||
for cp in event_cps:
|
||||
cp_definitions[cp.cp_number] = {
|
||||
@ -467,7 +467,7 @@ def download_scoreboard(request):
|
||||
'longitude': cp.longitude
|
||||
}
|
||||
except:
|
||||
# Locationモデルが存在しない場合
|
||||
# Location2025モデルが存在しない場合
|
||||
pass
|
||||
|
||||
# スタート・ゴール情報を取得
|
||||
|
||||
Reference in New Issue
Block a user