refactor for less duplication
refactored to use a common 'list.html' refactored to allow some modularization (using blocks)
This commit is contained in:
@@ -6,4 +6,4 @@ def root(request):
|
||||
|
||||
def list(request):
|
||||
teams = Team.objects.all()
|
||||
return render(request, 'teams/list.html', {'teams': teams})
|
||||
return render(request, 'list.html', {'title': "Teams", 'items': [f"{team.name}" for team in teams]})
|
||||
Reference in New Issue
Block a user