from django.http.response import HttpResponse


def homepage(request):
    return HttpResponse('Hello (again) World!')

from django.http.response import HttpResponse

from .models import Tag


def homepage(request):
    tag_list = Tag.objects.all()
    output = ", ".join([tag.name for tag in tag_list])
    return HttpResponse(output)

Modify homepage view to list Tags.
Ch04: Modify homepage view to list Tags.

  from django.http.response import HttpResponse
+ 
+ from .models import Tag
  
  
  def homepage(request):
-     return HttpResponse('Hello (again) World!')
+     tag_list = Tag.objects.all()
+     output = ", ".join([tag.name for tag in tag_list])
+     return HttpResponse(output)
  
Modify homepage view to list Tags.
## Code Before:
from django.http.response import HttpResponse


def homepage(request):
    return HttpResponse('Hello (again) World!')

## Instruction:
Modify homepage view to list Tags.
## Code After:
from django.http.response import HttpResponse

from .models import Tag


def homepage(request):
    tag_list = Tag.objects.all()
    output = ", ".join([tag.name for tag in tag_list])
    return HttpResponse(output)
