Пример #1
0
def confirm_res_app(request):
    """テスト用予約の確定(本申込期間)"""
    #TODO delete this method
    reservation_id = request.POST.get("reservation_id", "")

    if reservation_id:
        ResDao.create_res_by_lottery(reservation_id)
        LotDao.delete_by_reservation_id(reservation_id)
        return HttpResponseRedirect(reverse('test_reservation', {"error": ""}))

    return TemplateResponse(request, URL_REBGST003)
Пример #2
0
def turn_lottery_into_reservation(request, user_id):
    """TODO 削除予定
    抽選エンティティを予約エンティティへ変換する
    :param request:
    :param user_id:
    :param reservation_id:
    :return:
    """
    reservation_id = int(request.POST.get("reservation_id", 0))
    print("reservation_idは", reservation_id)
    ResDao.create_res_by_lottery(reservation_id)
    LotDao.delete_by_reservation_id(reservation_id)
    return HttpResponseRedirect(reverse('test_reservation', args=(user_id, )))