コード例 #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
ファイル: api.py プロジェクト: coati-00/mediathread
 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
ファイル: api.py プロジェクト: oaubert/mediathread
    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
ファイル: api.py プロジェクト: coati-00/mediathread
 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
ファイル: api.py プロジェクト: oaubert/mediathread
    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
ファイル: api.py プロジェクト: oaubert/mediathread
    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
ファイル: api.py プロジェクト: oaubert/mediathread
    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
ファイル: api.py プロジェクト: oaubert/mediathread
    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
ファイル: api.py プロジェクト: oaubert/mediathread
 class Meta:
     queryset = Asset.objects.none()
     excludes = ['added', 'modified', 'course', 'active', 'metadata_blob']
     authentication = ClassLevelAuthentication()
     authorization = AssetAuthorization()
     ordering = ['id', 'title']