diff --git a/app/views/public.py b/app/views/public.py index 0d9d316d..f0df5531 100644 --- a/app/views/public.py +++ b/app/views/public.py @@ -7,7 +7,7 @@ from django.shortcuts import render from app.api.tasks import TaskSerializer from app.models import Task - +from django.views.decorators.csrf import ensure_csrf_cookie def get_public_task(task_pk): """ @@ -18,6 +18,7 @@ def get_public_task(task_pk): raise Http404() return task +@ensure_csrf_cookie def handle_map(request, template, task_pk=None, hide_title=False): task = get_public_task(task_pk) @@ -36,6 +37,7 @@ def map(request, task_pk=None): def map_iframe(request, task_pk=None): return handle_map(request, 'app/public/map_iframe.html', task_pk, True) +@ensure_csrf_cookie def handle_model_display(request, template, task_pk=None): task = get_public_task(task_pk)