Commit 26f8fbe0 authored by okhin's avatar okhin 🚴

Merge branch '195-csrf-verification-failed-csrf-cookie-when-submitting-forms' into 'master'

Shutting down csrf for now. Some mystic shit is happening in uwsgi. /spend 6h.

See merge request !205
parents 592fc6d7 edae7d86
Pipeline #1070 passed with stages
in 10 minutes and 12 seconds
...@@ -13,9 +13,6 @@ ...@@ -13,9 +13,6 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
{% csrf_token %}
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="well well-sm text-justify">{% include "text/position_info.html" %}</div> <div class="well well-sm text-justify">{% include "text/position_info.html" %}</div>
...@@ -96,4 +93,4 @@ ...@@ -96,4 +93,4 @@
$("#add-position-success").modal("show"); $("#add-position-success").modal("show");
}); });
</script> </script>
{% endif %} {% endif %}
\ No newline at end of file
...@@ -6,7 +6,7 @@ import random ...@@ -6,7 +6,7 @@ import random
from django.db.models import Q, Count from django.db.models import Q, Count
from django.views import generic from django.views import generic
from django.utils.decorators import method_decorator from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_protect from django.views.decorators.csrf import csrf_exempt
from representatives.models import Chamber, Representative from representatives.models import Chamber, Representative
from representatives_positions.views import PositionFormMixin from representatives_positions.views import PositionFormMixin
...@@ -22,7 +22,7 @@ class HomeView(PositionFormMixin, RepresentativeViewMixin, ...@@ -22,7 +22,7 @@ class HomeView(PositionFormMixin, RepresentativeViewMixin,
generic.TemplateView): generic.TemplateView):
template_name = 'home.html' template_name = 'home.html'
@method_decorator(csrf_protect) @method_decorator(csrf_exempt)
def dispatch(self, *args, **kwargs): def dispatch(self, *args, **kwargs):
return super(HomeView, self).dispatch(*args, **kwargs) return super(HomeView, self).dispatch(*args, **kwargs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment