예제 #1
0
def lq_hanzi_db_search(request):
    if has_workbench_perm(request.user):
        return render(
            request, 'lq_hanzi_db_search.html', {
                "variant_type_choices": VARIANT_TYPE_CHOICES,
                "hanzi_type_choices": HANZI_TYPE_CHOICES,
                "source_choices": SOURCE_CHOICES
            })
    return render(request, '401.html')
예제 #2
0
def task_package_ongoing(request):
    user = request.user
    if has_workbench_perm(user):
        data = TaskPackages.objects.filter(
            user_id=user.id, status=getenum_task_package_status('ongoing'))
        task_packages = []
        for counter, item in enumerate(data):
            i = item.__dict__
            i['get_business_type_display'] = item.get_business_type_display()
            i['get_business_stage_display'] = item.get_business_stage_display()
            i['today_num'] = get_today_complete_task_num(
                user.id, item.business_type)
            i['get_status_display'] = item.get_status_display()
            task_packages.append(i)

        return render(request, 'task_package_ongoing.html', {
            'task_packages': task_packages,
        })
    return render(request, '401.html')
예제 #3
0
def task_package_complete(request):
    if has_workbench_perm(request.user):
        return render(request, 'task_package_complete.html')
    return render(request, '401.html')
예제 #4
0
def new_task_page(request):
    if has_workbench_perm(request.user):
        return render(request, 'new_task.html')
    return render(request, '401.html')
예제 #5
0
파일: diaries.py 프로젝트: cbakgly/lqhanzi
def index(request):
    if has_workbench_perm(request.user):
        return render(request, 'diaries.html')
    return render(request, '401.html')
예제 #6
0
파일: credits.py 프로젝트: cbakgly/lqhanzi
def redeem_page(request):
    if has_workbench_perm(request.user):
        return render(request, 'credits_redeem.html')
    return render(request, '401.html')
예제 #7
0
파일: credits.py 프로젝트: cbakgly/lqhanzi
def details_page(request):
    if has_workbench_perm(request.user):
        return render(request, 'credits_details.html')
    return render(request, '401.html')