title: Tastypie ajax POST obj_create - How to return json
body: <p>Im sending a POST that creates a new User, and that works.</p>
  
  <p>My question is how do I get back for example the pk of the created user to the ajax response?</p>
  
  <pre><code>         $.ajax({
                  url: 'http://localhost:8080/api/v1/create/user/',
                  type: 'POST',
                  contentType: 'application/json',
                  data: '{"uuid": "12345"}',
                  dataType: 'json',
                  processData: false,
                  success: function (r) {
                      console.log(r)
                  },
              });
  
  def obj_create(self, bundle, request=None, **kwargs):
          try:
              user = User.objects.create_user(bundle.data['uuid'],'1')
              user.save()
  
  
          except:
              pass
          return bundle
  </code></pre>