mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 17:33:08 +01:00
Merge pull request #104 from kratorius/csrf-api-fix
Exclude API calls from CSRF middleware.
This commit is contained in:
commit
17e6122fca
@ -20,6 +20,7 @@ from django.http import HttpResponse
|
|||||||
from django.shortcuts import render_to_response
|
from django.shortcuts import render_to_response
|
||||||
from django.template import loader, Context
|
from django.template import loader, Context
|
||||||
from django.utils import simplejson
|
from django.utils import simplejson
|
||||||
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
|
|
||||||
from helpdesk.forms import TicketForm
|
from helpdesk.forms import TicketForm
|
||||||
from helpdesk.lib import send_templated_mail, safe_template_context
|
from helpdesk.lib import send_templated_mail, safe_template_context
|
||||||
@ -33,6 +34,7 @@ STATUS_ERROR_PERMISSIONS = 403
|
|||||||
STATUS_ERROR_BADMETHOD = 405
|
STATUS_ERROR_BADMETHOD = 405
|
||||||
|
|
||||||
|
|
||||||
|
@csrf_exempt
|
||||||
def api(request, method):
|
def api(request, method):
|
||||||
"""
|
"""
|
||||||
Regardless of any other paramaters, we provide a help screen
|
Regardless of any other paramaters, we provide a help screen
|
||||||
|
Loading…
Reference in New Issue
Block a user