Beispiel #1
0
def get_registered_events(student):
        registrations = Registration.objects.order_by('event__start_time').filter(student=student)
        events = []
        for registration in registrations:
            events.append(registration.event)
        from event.serializers import serialize_event_for_student
        data = serialize_event_for_student(events, student, many=True) #EventSerializer(events, many=True).data
        return data
Beispiel #2
0
def get_bookmarked_events(student):
        bookmarks = Bookmark.objects.order_by('event__start_time').filter(student=student)
        events = []
        for bookmark in bookmarks:
            events.append(bookmark.event)
        from event.serializers import serialize_event_for_student
        data = serialize_event_for_student(events, student, many=True)
        return data
Beispiel #3
0
def get_bookmarked_events(student):
    bookmarks = Bookmark.objects.order_by('event__start_time').filter(
        student=student)
    events = []
    for bookmark in bookmarks:
        events.append(bookmark.event)
    from event.serializers import serialize_event_for_student
    data = serialize_event_for_student(events, student, many=True)
    return data
Beispiel #4
0
def get_registered_events(student):
    registrations = Registration.objects.order_by('event__start_time').filter(
        student=student)
    events = []
    for registration in registrations:
        events.append(registration.event)
    from event.serializers import serialize_event_for_student
    data = serialize_event_for_student(
        events, student, many=True)  #EventSerializer(events, many=True).data
    return data