views.py 文件源码

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

项目:nrp 作者: django-rea 项目源码 文件源码
def order_timeline(request, order_id):
    order = get_object_or_404(Order, pk=order_id)
    first_process = order.first_process_in_order()
    timeline_date = datetime.date.today().strftime("%b %e %Y 00:00:00 GMT-0600")
    if first_process:
        if first_process.start_date:
            timeline_date = first_process.start_date.strftime("%b %e %Y 00:00:00 GMT-0600")
    unassigned = Commitment.objects.unfinished().filter(
        independent_demand=order,
        from_agent=None,
        event_type__relationship="work").order_by("due_date")
    return render_to_response("valueaccounting/timeline.html", {
        "orderId": order.id,
        "context_id": 0,
        "useContextId": 0,
        "timeline_date": timeline_date,
        "unassigned": unassigned,
    }, context_instance=RequestContext(request))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号