예제 #1
0
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name in ('students', 'teachers', 'courses_created_of'):
         return WALKING_STOP
     elif field_name in ('owner', 'completion_badge', 'created_from'):
         return ONLY_REFERENCE
     elif field_name == 'unit':
         return WALKING_INTO_CLASS
     update_the_serializer(obj, field_name)
예제 #2
0
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name in ('pages_created_of', 'website', 'website_initial_page'):
         return WALKING_STOP
     elif field_name == 'created_from':
         return ONLY_REFERENCE
     elif field_name == 'last_editor':
         return WALKING_INTO_CLASS
     update_the_serializer(obj, field_name)
예제 #3
0
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name in ('initial_page', 'websites_created_of'):
         return WALKING_STOP
     elif field_name in ('original_website', 'owners'):
         return ONLY_REFERENCE
     elif field_name == 'page':
         return WALKING_INTO_CLASS
     update_the_serializer(obj, field_name)
예제 #4
0
파일: serializer.py 프로젝트: ntwuxc/moocng
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name in ('students', 'teachers', 'courses_created_of'):
         return WALKING_STOP
     elif field_name in ('owner', 'completion_badge', 'created_from'):
         return ONLY_REFERENCE
     elif field_name == 'unit':
         return WALKING_INTO_CLASS
     update_the_serializer(obj, field_name)
예제 #5
0
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name == 'assignment':
         return ONLY_REFERENCE
     update_the_serializer(obj, field_name)
예제 #6
0
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name == 'kq':
         return ONLY_REFERENCE
     elif field_name == 'criteria':
         return WALKING_INTO_CLASS
     update_the_serializer(obj, field_name)
예제 #7
0
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name == 'unit':
         return ONLY_REFERENCE
     elif field_name in ('attachment', 'question', 'peerreviewassignment'):
         return WALKING_INTO_CLASS
     update_the_serializer(obj, field_name)
예제 #8
0
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name == 'course':
         return WALKING_STOP
     elif field_name == 'knowledgequantum':
         return WALKING_INTO_CLASS
     update_the_serializer(obj, field_name)
예제 #9
0
파일: serializer.py 프로젝트: ntwuxc/moocng
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name == 'assignment':
         return ONLY_REFERENCE
     update_the_serializer(obj, field_name)
예제 #10
0
파일: serializer.py 프로젝트: ntwuxc/moocng
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name == 'kq':
         return ONLY_REFERENCE
     elif field_name == 'criteria':
         return WALKING_INTO_CLASS
     update_the_serializer(obj, field_name)
예제 #11
0
파일: serializer.py 프로젝트: ntwuxc/moocng
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name == 'unit':
         return ONLY_REFERENCE
     elif field_name in ('attachment', 'question', 'peerreviewassignment'):
         return WALKING_INTO_CLASS
     update_the_serializer(obj, field_name)
예제 #12
0
파일: serializer.py 프로젝트: ntwuxc/moocng
 def walking_into_class(cls, initial_obj, obj, field_name, model, request=None):
     if field_name == 'course':
         return WALKING_STOP
     elif field_name == 'knowledgequantum':
         return WALKING_INTO_CLASS
     update_the_serializer(obj, field_name)