fixed draw and draw-results notification logics
This commit is contained in:
@@ -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
|
||||
})
|
||||
Reference in New Issue
Block a user