"CSRF token missing" with PUT/DELETE meethod rest-framework
<p>I'm using using django rest framework browsable api with ModelViewSet to do CRUD actions and want to use permissions.IsAuthenticatedOrReadOnly, but when I'm logged and try to DELETE or PUT I get
<code>"detail": "CSRF Failed: CSRF token missing or incorrect."</code></p>

<p>My view looks like this</p>

<pre><code>class objViewSet(viewsets.ModelViewSet):
    queryset = obj.objects.all()
    serializer_class = objSerializer
    permission_classes = (permissions.IsAuthenticatedOrReadOnly,)
</code></pre>

<p>Settings.py</p>

<pre><code>REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
    'rest_framework.permissions.AllowAny',
),
</code></pre>

<p>Serializer is just</p>

<pre><code>class ObjSerializer(serializers.ModelSerializer):
    class Meta:
        model = Obj
</code></pre>

<p>Although when I delete permission_classes (so the default allowAny triggers) I can it works just fine.</p>

<p><strong>What I want</strong></p>

<p>To be able to PUT/DELETE only when I'm authenticated. I don't know how to send CSRF token, when all happens automatically (modalviewset does the whole work)</p>