This repository has been archived on 2019-11-11. You can view files and clone it, but cannot push or open issues or pull requests.
tofu/issues/views.py

18 lines
415 B
Python

from django.shortcuts import get_object_or_404, render
from .models import Issue
def index(request):
issue_list = Issue.objects.order_by('create_date')
return render(request, 'issues/index.html', {
'issue_list': issue_list,
})
def detail(request, issue_id):
issue = get_object_or_404(Issue, pk=issue_id)
return render(request, 'issues/detail.html', {
'issue': issue,
})