 url: form.attr('action'),
            data: $('form').serialize(),
            type: "PUT",
            beforeSend: function(xhr){xhr.setRequestHeader('Authorization', 'Token '+token);}
          }).fail(function(data){error_response(data);})
          .done(function(data){susccess_response(data);});
          return false;
        });

      });
    </script>
{% endblock %}
