views.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:wiinaq 作者: futurulus 项目源码 文件源码
def entry(request, word):
    chunks = get_list_or_404(Chunk, entry=word)
    entries = group_entries(chunks, separate_roots=True)
    assert len(entries) == 1
    context = {'word': word,
               'roots': [{'root': root.root,
                          'pos': root.pos,
                          'id': root.id,
                          'inflections': inflection_data(root),
                          'senses': root.senses}
                         for root in entries[0].roots],
               'url': request.build_absolute_uri(request.get_full_path()),
               'request': request}
    return render(request, 'dictionary/entry.html', context)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号