Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
0fde4ff9
Commit
0fde4ff9
authored
Jun 18, 2013
by
Kostas Papadimitriou
Browse files
pithos-app: Update pithos.api.util.api_method wrapper
to match the updated snf_django api_method decorator
parent
3927d22b
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-pithos-app/pithos/api/util.py
View file @
0fde4ff9
...
...
@@ -1062,14 +1062,16 @@ def get_pithos_usage(token):
def
api_method
(
http_method
=
None
,
token_required
=
True
,
user_required
=
True
,
logger
=
None
,
format_allowed
=
False
,
serializations
=
None
):
format_allowed
=
False
,
serializations
=
None
,
strict_serlization
=
False
):
serializations
=
serializations
or
[
'json'
,
'xml'
]
def
decorator
(
func
):
@
api
.
api_method
(
http_method
=
http_method
,
token_required
=
token_required
,
user_required
=
user_required
,
logger
=
logger
,
format_allowed
=
format_allowed
,
astakos_url
=
ASTAKOS_BASE_URL
,
serializations
=
serializations
)
serializations
=
serializations
,
strict_serlization
=
strict_serlization
)
@
wraps
(
func
)
def
wrapper
(
request
,
*
args
,
**
kwargs
):
# The args variable may contain up to (account, container, object).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment