boards/views.py 12345678910111213 from django.http import HttpResponsefrom .models import Boarddef (request): boards = Board.objects.all() boards_names = list() for board in boards: boards_names.append(board.name) response_html = '<br>'.join(boards_names) return HttpResponse(response_html) 结果就是这个简单的HTML页面: 赞微海报分享
近期评论