title: Django REST Framework: save/update/delete object with related in one transaction. How to?
body: <p>I want to ask you, how to deal with adding/editing/deleting objects with many inlines objects (like in Django Admin + FormSet) using DRF. For example:</p>
  
  <pre><code>Publication:
    - title
    - description
    + Notofications (1 and more)
      - first_name
      - email
    + Images (1 and more)
      - title
      - url
    + Attributes (1 and more)
      - name
      - value
  </code></pre>
  
  <p>JSON input:</p>
  
  <pre><code>{
       "title": "..", 
       "description": "..", 
       "notifications": [{"first_name": "", "email": ""}, ...]
       "images": [{"title": "", "url": ""}, ...]
       "attributes": [{"name": "", "value": ""}, ...]
  }
  </code></pre>
  
  <p>So I think that "adding" such structure is quite simple, but how about "updating" (or "patching") and "deleting" (eg. one of the images)? The whole request should be done in transaction, eg: if we do some edit of publication's title and image's url, and the url has wrong format, we should not save neither publication object nor the image object.</p>
  
  <p>Is there a good pattern in REST API?</p>
  
  <p>Thank you.</p>