views.py 文件源码

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

项目:nrp 作者: django-rea 项目源码 文件源码
def timeline(request, from_date, to_date, context_id):
    try:
        from_date_date = datetime.datetime(*time.strptime(from_date, '%Y_%m_%d')[0:5]).date()
        to_date_date = datetime.datetime(*time.strptime(to_date, '%Y_%m_%d')[0:5]).date()
    except ValueError:
        raise Http404
    context_id = int(context_id)
    if context_id:
        context_agent = get_object_or_404(EconomicAgent, pk=context_id)
    timeline_date = datetime.date.today().strftime("%b %e %Y 00:00:00 GMT-0600")
    unassigned = Commitment.objects.unfinished().filter(
        from_agent=None,
        event_type__relationship="work").order_by("due_date")
    return render_to_response("valueaccounting/timeline.html", {
        "orderId": 0,
        "context_id": context_id,
        "useContextId": 0,
        "from_date": from_date,
        "to_date": to_date,
        "timeline_date": timeline_date,
        "unassigned": unassigned,
    }, context_instance=RequestContext(request))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号