title: Django-rest-auth - Angular - 500 internal error
body: <p>More or less, i am in the early stages developing an app  that use Django Rest Framework and Angular. 
  I decided to use <a href="https://django-rest-auth.readthedocs.org/en/latest/" rel="nofollow">django-rest-auth</a> to manage all my user integration with my app. </p>
  
  <p>As I am new in Angular, i don't want to use django-rest-auth Boilerplate Angular app in order to understand the concepts of Angular. I just want to use django-rest-auth endpoints. </p>
  
  <p><strong>The problem is:</strong>
  My registration form throughs an Internal Server 500 even that my data are passed and successfully submitted to django.User model.</p>
  
  <p>Here is <strong>my Angular ap</strong>p:</p>
  
  <pre><code>// MODULE
  
  var menuApp = angular.module('menuApp', ['ngRoute', 'ngCookies']);
  
  //ROUTES
  menuApp.config(function ($locationProvider, $routeProvider) {
  
  $locationProvider.html5Mode({
  enabled: true,
  requireBase: false,
      hashPrefix:'!'
  })
  
  $routeProvider
  
  .when('/', {
      templateUrl: '/static/app/pages/login.html',
      controller: 'homeCtrl'
  })
  .when('/register', {
      templateUrl: 'static/app/pages/register.html',
      controller: 'registerCtrl'
  })
  
   menuApp.controller('homeCtrl', ['$log', '$scope', function($log,    $scope) {
          $log.info("homeCtrl is called ");
  }]);
  
   menuApp.controller('registerCtrl', ['$scope', '$cookies', '$http','$location',
                                                  function($scope, $cookies, $http, $location) {
  
          console.log("registerCtrl is called");
  
          $scope.register = function(email, username, password){
          var data = {
              'username': username,
              'password1': password,
              'password2': password,
              'email': email
          }
          console.log(data)
  
          var make_registration = $http({
                  url: "/api/rest-auth/registration/",
                  method: "POST",
                  headers: {
                      'X-CSRFToken': $cookies.token,
                      'Content-Type': 'application/json'},
                  data: data,
                      })
          .success(function(data, status, headers) {
              console.log($cookies.csrftoken)
              console.log(data);
              console.log(status);
              console.log(headers);
          })
          .error(function(data, status, headers) {
                              // Need a minimal function to pass the errors
                              console.log(status);
                              console.log(data);
          });
          return make_registration
              }
  
     }]);
  
    // RUN
   menuApp.run(function ($http) {
      $http.defaults.xsrfHeaderName = 'X-CSRFToken';
      $http.defaults.xsrfCookieName = 'csrftoken';
   });
  </code></pre>
  
  <p><strong>My form</strong> is a very simple one with a 'ng-submit="register(email, username, password)' and 3 inputs ng-model='email' etc.</p>
  
  <p><strong>My urls</strong> :</p>
  
  <pre><code>urlpatterns = patterns('',
  
   url(r'^admin/', include(admin.site.urls)),
   url(r'^api/rest-auth/', include('rest_auth.urls')),
   url(r'^api/rest-auth/registration/',
          include('rest_auth.registration.urls')),
   url('^.*$', IndexView.as_view(), name='index'),
  )
  </code></pre>