Пример #1
0
 class Meta:
     queryset = Asset.objects.none()
     excludes = ['added', 'course', 'active', 'metadata_blob']
     list_allowed_methods = []
     detail_allowed_methods = []
     authentication = ClassLevelAuthentication()
     ordering = ['added', 'modified', 'id', 'title', 'author']
Пример #2
0
 class Meta:
     queryset = Project.objects.all().order_by('id')
     excludes = ['participants', 'body', 'feedback', 'sherdnote_set']
     list_allowed_methods = []
     detail_allowed_methods = []
     authentication = ClassLevelAuthentication()
     ordering = ['id', 'title']
Пример #3
0
 class Meta:
     queryset = Term.objects.all().order_by('id')
     list_allowed_methods = ['get', 'post']
     detail_allowed_methods = ['get', 'put', 'delete']
     authentication = ClassLevelAuthentication()
     authorization = FacultyAuthorization()
     excludes = ['description', 'ordinality']
     validation = TermValidation()
Пример #4
0
    class Meta:
        queryset = SherdNote.objects.none()
        excludes = ['tags', 'body', 'added', 'modified', 'title']

        # User is logged into some course
        authentication = ClassLevelAuthentication()

        # User is authorized to look at this particular SherdNote
        authorization = SherdNoteAuthorization()
Пример #5
0
 class Meta:
     queryset = Vocabulary.objects.all().order_by('id')
     list_allowed_methods = ['get', 'post']
     detail_allowed_methods = ['get', 'put', 'delete']
     authentication = ClassLevelAuthentication()
     authorization = VocabularyAuthorization()
     excludes = ['description', 'single_select']
     ordering = ['display_name']
     validation = VocabularyValidation()
Пример #6
0
    class Meta:
        queryset = Project.objects.all().order_by('id')
        excludes = ['participants', 'body', 'submitted', 'feedback']
        list_allowed_methods = ['get']
        detail_allowed_methods = ['get']
        authentication = ClassLevelAuthentication()
        authorization = ProjectAuthorization()
        ordering = ['id', 'title']

        filtering = {'author': ALL_WITH_RELATIONS}
Пример #7
0
    class Meta:
        queryset = Course.objects.all()
        resource_name = "course_summary"
        list_allowed_methods = []
        detail_allowed_methods = ['get']

        # User is logged into some course
        authentication = ClassLevelAuthentication()

        # User is a member of this course
        authorization = CourseMemberAuthorization()
Пример #8
0
    class Meta:
        queryset = Asset.objects.select_related('author').order_by('id')
        excludes = ['added', 'modified', 'course', 'active', 'metadata_blob']
        list_allowed_methods = ['get']
        detail_allowed_methods = ['get']
        authentication = ClassLevelAuthentication()
        authorization = AssetAuthorization()
        ordering = ['modified', 'id', 'title']

        filtering = {
            'author': ALL_WITH_RELATIONS,
            'sherdnote_set': ALL_WITH_RELATIONS
        }
Пример #9
0
    class Meta:
        queryset = SherdNote.objects.select_related('asset').order_by("id")
        excludes = ['tags', 'body', 'added', 'modified']
        list_allowed_methods = ['get']
        detail_allowed_methods = ['get']
        filtering = {
            'author': ALL_WITH_RELATIONS,
            'range1': ALL_WITH_RELATIONS,
        }

        # User is logged into some course
        authentication = ClassLevelAuthentication()

        # User is authorized to look at this particular SherdNote
        authorization = SherdNoteAuthorization()
Пример #10
0
    class Meta:
        queryset = Course.objects.all()
        excludes = ['group']
        list_allowed_methods = []
        detail_allowed_methods = ['get']
        ordering = ['project_set__title']

        # User is logged into some course
        authentication = ClassLevelAuthentication()

        # User is a member of this course
        authorization = CourseMemberAuthorization()

        filtering = {
            'project_set': ALL_WITH_RELATIONS,
            'asset_set': ALL_WITH_RELATIONS
        }
Пример #11
0
 class Meta:
     queryset = TermRelationship.objects.none()
     authentication = ClassLevelAuthentication()
     limit = 1000
     max_limit = 1000
Пример #12
0
 class Meta:
     queryset = Asset.objects.none()
     excludes = ['added', 'modified', 'course', 'active', 'metadata_blob']
     authentication = ClassLevelAuthentication()
     authorization = AssetAuthorization()
     ordering = ['id', 'title']