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
fec55650
Commit
fec55650
authored
Jun 07, 2013
by
Kostas Papadimitriou
Browse files
django-lib: Exempt api_method views from csrf
parent
45b93b41
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-django-lib/snf_django/lib/api/__init__.py
View file @
fec55650
...
...
@@ -41,6 +41,7 @@ from django.http import HttpResponse
from
django.utils
import
cache
from
django.utils
import
simplejson
as
json
from
django.template.loader
import
render_to_string
from
django.views.decorators
import
csrf
from
astakosclient
import
AstakosClient
from
astakosclient.errors
import
AstakosClientException
...
...
@@ -118,7 +119,7 @@ def api_method(http_method=None, token_required=True, user_required=True,
logger
.
exception
(
"Unexpected ERROR"
)
fault
=
faults
.
InternalServerError
(
"Unexpected error"
)
return
render_fault
(
request
,
fault
)
return
wrapper
return
csrf
.
csrf_exempt
(
wrapper
)
return
decorator
...
...
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