Beispiel #1
0
 class Meta:
     queryset = Course.objects.all()
     resource_name = 'course'
     allowed_methods = ['get']
     fields = ['id', 'title', 'version', 'shortname', 'is_draft', 'description', 'author', 'username']
     authentication = ApiKeyAuthentication()
     authorization = ReadOnlyAuthorization()
     serializer = CourseJSONSerializer()
     always_return_data = True
     include_resource_uri = True
Beispiel #2
0
 class Meta:
     queryset = Course.objects.filter(CourseFilter.IS_NOT_DRAFT
                                      & CourseFilter.IS_NOT_ARCHIVED)
     resource_name = 'coursestructure'
     allowed_methods = ['get']
     fields = ['shortname', 'id', 'structure']
     authentication = Authentication()
     authorization = Authorization()
     serializer = CourseJSONSerializer()
     always_return_data = True
     include_resource_uri = True
Beispiel #3
0
 class Meta:
     queryset = Course.objects.filter(is_draft=False, is_archived=False)
     resource_name = 'coursestructure'
     allowed_methods = ['get']
     fields = ['shortname',
               'id',
               'structure']
     authentication = Authentication()
     authorization = Authorization()
     serializer = CourseJSONSerializer()
     always_return_data = True
     include_resource_uri = True