Beispiel #1
0
def get_detail(request):
    app_id = request.GET.get('id')
    app = get_object_or_404(ExhibitApplication, id=app_id)
    data = {'organization': app.organization.chinese_name,
            'place': app.place,
            'start_date': app.start_date.strftime('%Y年%m月%d日'),
            'end_date': app.end_date.strftime('%Y年%m月%d日'),
            'time': app.time,
            'activity': app.activity,
            'approved': app.approved, 'plan_file': app.plan_file.url,
            'applicant_name': app.applicant_name,
            'applicant_phone_number': app.applicant_phone_number,
            'applicant_stu_id': app.applicant_stu_id,
            'applicant_college': app.applicant_college,
            'application_time': \
                    app.application_time.strftime('%Y年%m月%d日 %H:%M:%S'),
            'sponsor': app.sponsor, 'sponsorship': app.sponsorship,
            'sponsorship_usage': app.sponsorship_usage,
            'activity_summary': app.activity_summary,
            'exhibit_board_number': app.exhibit_board_number,
            'exhibition': app.exhibition,
            'remarks': app.remarks,
            'id': app_id,
            'user_is_manager': request.user.has_perm('account.manager')}
    return render_json(data)
Beispiel #2
0
def conflict_for_form(request):
    ''' return conflict application to form '''
    if request.method != 'GET':
        raise Exception('request method is not GET')
    id = request.GET.get('id')
    time = request.GET.get('time')
    place = request.GET.get('place')
    app_date = datetime.datetime.strptime(request.GET.get('date'),
                                          '%Y-%m-%d').date()
    return render_json(find_conflict_app(id, place, app_date, time))
Beispiel #3
0
def get_detail(request):
    app_id = request.GET.get('id')
    app = get_object_or_404(SouthStadiumApplication, id=app_id)
    data = {'organization': app.organization.chinese_name,
            'date': app.date.strftime('%Y年%m月%d日'),
            'time': app.time, 'activity': app.activity,
            'approved': app.approved, 'plan_file': app.plan_file.url,
            'applicant_name': app.applicant_name,
            'applicant_phone_number': app.applicant_phone_number,
            'application_time': \
                    app.application_time.strftime('%Y年%m月%d日 %H:%M:%S'),
            'sponsor': app.sponsor, 'sponsorship': app.sponsorship,
            'sponsorship_usage': app.sponsorship_usage,
            'activity_summary': app.activity_summary,
            'remarks': app.remarks }
    return render_json(data)
Beispiel #4
0
def get_detail(request):
    app_id=request.GET.get('id')
    app = get_object_or_404(MeetingRoomApplication, id=app_id)
    data = {'organization': app.organization.chinese_name,
            'place': app.place,
            'date': app.date.strftime('%Y年%m月%d日'),
            'time': app.time,
            'meeting_topic': app.meeting_topic,
            'approved': app.approved,
            'applicant_name': app.applicant_name,
            'applicant_phone_number': app.applicant_phone_number,
            'application_time': \
                    app.application_time.strftime('%Y年%m月%d日 %H:%M:%S'),
            'meeting_summary': app.meeting_summary,
            'remarks': app.remarks }
    return render_json(data)
Beispiel #5
0
def get_detail(request):
    app_id = request.GET.get('id')
    app = get_object_or_404(MeetingRoomApplication, id=app_id)
    data = {'organization': app.organization.chinese_name,
            'place': app.place,
            'date': app.date.strftime('%Y年%m月%d日'),
            'time': app.time,
            'meeting_topic': app.meeting_topic,
            'approved': app.approved,
            'applicant_name': app.applicant_name,
            'applicant_phone_number': app.applicant_phone_number,
            'application_time': \
                    app.application_time.strftime('%Y年%m月%d日 %H:%M:%S'),
            'meeting_summary': app.meeting_summary,
            'remarks': app.remarks }
    return render_json(data)
Beispiel #6
0
def get_detail(request):
    app_id = request.GET.get('id')
    app = get_object_or_404(MeetingRoomApplication, id=app_id)
    data = {'organization': app.organization.chinese_name,
            'place': app.place,
            'date': app.date.strftime('%Y年%m月%d日'),
            'time': app.time,
            'meeting_topic': app.meeting_topic,
            'approved': app.approved,
            'applicant_name': app.applicant_name,
            'applicant_phone_number': app.applicant_phone_number,
            'applicant_stu_id': app.applicant_stu_id,
            'applicant_college': app.applicant_college,
            'meeting_summary': app.meeting_summary,
            'remarks': app.remarks,
            'id': app_id,
            'user_is_manager': request.user.has_perm('account.manager'),
            'conflict_apps': \
                    find_conflict_app(app_id, app.place, app.date, ','.join(app.time))}
    return render_json(data)