title: Django rest basic authentication issue (HTTP 400)
body: <p>I am building an API which has basic authentication enabled. When I'm trying to add an instance to the database (on a viewset which has the AllowAny setting) using the browsable api it. This works when I am not logged. However when I'm not logged in it gives me an error:</p>
  
  <p>HTTP 400 Bad Request
  Content-Type: application/json
  Vary: Accept
  Allow: POST, OPTIONS</p>
  
  <pre><code>{
      "product": [
          "This field is required."
      ],
      "buyername": [
          "This field is required."
      ],
      "buyeremail": [
          "This field is required."
      ]
  }
  </code></pre>
  
  <p>This is the viewset:</p>
  
  <pre><code>class TicketBuyerViewSet(mixins.CreateModelMixin,  
                     viewsets.GenericViewSet):
      queryset = Ticket.objects.all()
      serializer_class = TicketSerializer
      permission_classes = (IsOwnerOrReadOnly,permissions.AllowAny)
  
      def perform_create(self, serializer):
          serializer.save(isPayed=False,checkedIn=False,isRefunded=False,checkedInDate=None,paymentID="",paymentDate=None)
  </code></pre>
  
  <p>And this is my urls.py file:</p>
  
  <pre><code>from django.conf.urls import include, url
  from django.contrib import admin
  
  urlpatterns = [
      url(r'^admin/', include(admin.site.urls)),
      url(r'^', include('events.urls')),
      url(r'^docs/', include('rest_framework_swagger.urls')),
  ]
  
  urlpatterns += [
      url(r'^api-auth/', include('rest_framework.urls',
                                 namespace='rest_framework')),
  ]
  </code></pre>
  
  <p>I have been having this problem only recently. I made the snippets app from the django docs which worked perfectly for about a week. However, since a couple day I have the same problem with this api as with my 'own' api. I have tried chrome and firefox as well.</p>
  
  <p><strong>Edit:</strong> While I get why the http error codes may be confusing opposed to my question I do highly suspect the error lies in the django-rest authentication because when I log out and I fill in the EXACT same data it DOES work. Here are the response error codes for the PUT request when I'm logged in and logged out respectively:</p>
  
  <pre><code>[03/Nov/2015 20:38:44] "POST /ticketsbuyer/ HTTP/1.1" 400 10513
  [03/Nov/2015 20:39:24] "POST /ticketsbuyer/ HTTP/1.1" 201 4543
  </code></pre>
  
  <p><strong>Edit 2:</strong> I downloaded the exact source code from the django-rest-framework-tutorial github. I created a superuser and the EXACT same thing happened, for some reason django rest browsable api or my browser is not sending the post data correctly. </p>
  
  <p><strong>Edit 3</strong> For some reason it worked for me to downgrade to version 3.2.5 of the rest-framework. I'm not the only one with this problem: <a href="https://stackoverflow.com/questions/33441197/django-rest-framework-browsable-api-form-always-returns-400-bad-request/33510801#33510801">Django Rest Framework - Browsable API Form always returns 400 bad request</a></p>