这些练习并没有多少用,但舍不得就扔了,作个记录吧。

文章分享了傍晚打篮球的乐趣,并在晚上更新了练习进度。接着,作者与父亲一同观看亚锦赛男篮决赛,关注焦点是中国与菲律宾之间的对决。通过将个人体验与篮球比赛相融合,文章巧妙地结合了体育与数据分析的主题,展现了运动与科技的完美结合。

打了一下午球,感觉爽爽的。。

晚上更新一下练习进度,然后,马上陪老爸看亚锦赛男篮决塞罗。。中国VS菲律宾。

 

from django.shortcuts import render
from django.http import Http404
from django.shortcuts import get_object_or_404
from django.http import HttpResponse
from .models import Question
from django.template import RequestContext, loader

# Create your views here.
def index(request):
    latest_question_list = Question.objects.order_by('pub_date')[:5]
    #template = loader.get_template('polls/index.html')
    #context = RequestContext(request, {'latest_question_list': latest_question_list})
    #output = ','.join([p.question_text for p in latest_question_list])
    context = {'latest_question_list': latest_question_list}
    return render(request, 'polls/index.html', context)

def detail(request, question_id):
    question = get_object_or_404(Question, pk=question_id)
    '''
    try:
        question = Question.objects.get(pk=question_id)
    except Question.DoesNotExist:
        raise Http404("Question does not exist")
    '''
    return render(request, 'polls/detail.html', {'question': question})

def results(request, question_id):
    response = "You're looking at the results of question %s."
    return HttpResponse(response % question_id)

def vote(request, question_id):
    return HttpResponse("You're voting on question %s" % question_id)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值