fixed draw and draw-results notification logics

This commit is contained in:
2025-07-22 05:09:28 +09:00
parent 37b0507c07
commit 7acdcc7465
3 changed files with 14 additions and 4 deletions

View File

@@ -1,3 +1,12 @@
from django.shortcuts import render
from django.shortcuts import get_object_or_404
from .models import Lottery, DrawResult
# Create your views here.
def view_draw_results(request, lottery_id):
lottery = get_object_or_404(Lottery, id=lottery_id)
draw_results = lottery.draw_results.all()
return render(request, "admin/draw_result.html", {
"lottery": lottery,
"draw_results": draw_results
})