Ejemplo n.º 1
0
def get_lecturers_json(request, subject_id):
    lecturers = LecturerService.lecturers_of_subject(subject_id)
    json = json_lib.dumps([{
        'id':
        lecturer.id,
        'name':
        lecturer.first_name + ' ' + lecturer.last_name
    } for lecturer in lecturers])

    return JsonResponse(json, safe=False)
Ejemplo n.º 2
0
def get_lecturers_json(request, subject_id):
    lecturers = LecturerService.lecturers_of_subject(subject_id)
    json = json_lib.dumps(
        [{'id': lecturer.id, 'name': lecturer.first_name + ' ' + lecturer.last_name} for lecturer in lecturers])

    return JsonResponse(json, safe=False)
Ejemplo n.º 3
0
def list_lecturers(request, subject_id):
    lecturers = LecturerService.lecturers_of_subject(subject_id)

    return render_to_response('lecturer/list.html', {'lecturers': lecturers},
                              context_instance=RequestContext(request))
Ejemplo n.º 4
0
def list_lecturers(request, subject_id):
    lecturers = LecturerService.lecturers_of_subject(subject_id)

    return render_to_response('lecturer/list.html', {'lecturers': lecturers},
                              context_instance=RequestContext(request))