# HG changeset patch # User cavaliet # Date 1415120689 -3600 # Node ID c59a51cf2dda0d4a7cc504c90049891d636888ee # Parent 600dbe94e74cb70880953dde9c4e204621a2c2c8# Parent dafb175c9e8caa9aa13d6f1c69d57755b576ad27 Merge with dafb175c9e8caa9aa13d6f1c69d57755b576ad27 diff -r 600dbe94e74c -r c59a51cf2dda src/ldt/ldt/api/ldt/resources/content.py --- a/src/ldt/ldt/api/ldt/resources/content.py Tue Nov 04 18:03:34 2014 +0100 +++ b/src/ldt/ldt/api/ldt/resources/content.py Tue Nov 04 18:04:49 2014 +0100 @@ -8,6 +8,8 @@ from tastypie import fields from tastypie.resources import Bundle, ModelResource, ALL_WITH_RELATIONS, ALL +from ldt.api.ldt.authentication import (SessionAuthentication, + MultiAuthentication, ApiKeyAuthentication) from ldt.indexation import get_results_list from ldt.ldt_utils.models import Content, Media, Project, Segment from ldt.ldt_utils.projectserializer import ProjectJsonSerializer, ProjectMerger @@ -39,6 +41,7 @@ class Meta: allowed_methods = ['get'] resource_name = 'contents' + authentication = MultiAuthentication(ApiKeyAuthentication(), SessionAuthentication()) queryset = Content.objects.select_related('front_project','media_obj').all() filtering = { 'tags' : ALL_WITH_RELATIONS,