Revision 2aba7764 snf-pithos-app/pithos/api/views.py
b/snf-pithos-app/pithos/api/views.py | ||
---|---|---|
31 | 31 |
# interpreted as representing official policies, either expressed |
32 | 32 |
# or implied, of GRNET S.A. |
33 | 33 |
|
34 |
from django.views.decorators.csrf import csrf_exempt |
|
35 |
|
|
36 |
from snf_django.lib import api |
|
37 |
|
|
34 | 38 |
from pithos.api.functions import _object_read |
35 | 39 |
from pithos.api.util import api_method, view_method |
36 | 40 |
|
... | ... | |
38 | 42 |
logger = logging.getLogger(__name__) |
39 | 43 |
|
40 | 44 |
|
45 |
@csrf_exempt |
|
46 |
def object_demux(request, v_account, v_container, v_object): |
|
47 |
if request.method == 'GET': |
|
48 |
return object_read(request, v_account, v_container, v_object) |
|
49 |
else: |
|
50 |
return api.api_method_not_allowed(request, allowed_methods=['GET']) |
|
51 |
|
|
52 |
|
|
41 | 53 |
@view_method() |
42 | 54 |
@api_method('GET', format_allowed=True, user_required=True, logger=logger) |
43 | 55 |
def object_read(request, v_account, v_container, v_object): |
Also available in: Unified diff