Django入门指南-第6章:第一个视图函数(完结)

# boards/views.py
from django.http import HttpResponse
from .models import Board def home(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)
上一篇:TCP/IP及内核参数优化调优(转)


下一篇:Centos内核参数优化