Skip to content

Commit

Permalink
Merge pull request #76 from crab85193/dev_crab
Browse files Browse the repository at this point in the history
  • Loading branch information
crab85193 authored Dec 4, 2023
2 parents 4a2130d + 4fc42bd commit d4f54da
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main_app/views/twilio.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import datetime
from django.utils import timezone
from zoneinfo import ZoneInfo
from django.http import HttpResponse, HttpResponseRedirect
from django.views import View
Expand Down Expand Up @@ -30,12 +31,12 @@ def create_message(self, reservation_id):
n_month = n_datetime.month
n_day = n_datetime.day

message = f"こんにちは、電話予約の代理アプリ、Telyです。"
message = f"こんにちは、電話予約の代理アプリ、テリーです。"

if n_year == r_year and n_month == r_month and n_day == r_day:
message += f"本日の"
elif n_year == r_year and n_month == r_month:
message += f"今月{r_day}日の"
message += f"こんげつ{r_day}日の"
elif n_year == r_year:
message += f"{r_month}{r_day}日の"
else:
Expand Down Expand Up @@ -106,7 +107,8 @@ def get(self, request, *args, **kwargs):
message = '代理予約処理が完了しました。'
)

obj_parent.status = ReservationParent.END
obj_parent.is_end = True
obj_parent.end_datetime = timezone.now
obj_parent.save()

elif digit_pressed == "2":
Expand All @@ -127,7 +129,8 @@ def get(self, request, *args, **kwargs):
message = '代理予約処理が完了しました。'
)

obj_parent.status = ReservationParent.END
obj_parent.is_end = True
obj_parent.end_datetime = timezone.now
obj_parent.save()

else:
Expand Down

0 comments on commit d4f54da

Please sign in to comment.