示例#1
0
文件: home.py 项目: ziyun-wang/qmpy
def home_page(request):
    data = get_globals()
    data.update({
        'done':
        '{:,}'.format(Formation.objects.filter(fit='standard').count()),
    })
    request.session.set_test_cookie()
    return render_to_response('index.html', data, RequestContext(request))
示例#2
0
文件: home.py 项目: PingjieTang/qmpy
def home_page(request):
    data = get_globals()
    data.update({
        'done':Entry.objects.filter(
            formationenergy__fit='standard').distinct(),
        'running':Task.objects.filter(state=1),
        'recent':Calculation.objects.filter(label='static',
            converged=True).order_by('-id')[:5]})
    request.session.set_test_cookie()
    return render_to_response('index.html',
            data,
            RequestContext(request))
示例#3
0
def home_page(request):
    data = get_globals()
    data.update({
        'done':
        Entry.objects.filter(formationenergy__fit='standard').distinct(),
        'running':
        Task.objects.filter(state=1),
        'recent':
        Calculation.objects.filter(label='static',
                                   converged=True).order_by('-id')[:5]
    })
    request.session.set_test_cookie()
    return render_to_response('index.html', data, RequestContext(request))
示例#4
0
def download_home(request):
    data = get_globals()
    data['updated_on'] = DatabaseUpdate.value()
    return render_to_response('download.html', data)
示例#5
0
def download_home(request):
    data = get_globals()
    data['updated_on'] = DatabaseUpdate.value()
    return render_to_response('download.html', data)