title: How can I add a "duplicate" button next to the "add another ..." button in djangos admin.StackedInline?
body: <p>Is there a possibility to add a &quot;copy&quot; or &quot;duplicate&quot; button next to the &quot;add another ...&quot; button in djangos admin.StackedInline (see image)? It should add another object and prepopulate the fields based on the previous object (if that exists).</p>
  <p>Another fix could be to prepopulate the fields based on the previous object when adding it via &quot;add another ...&quot;, but I don't know how to do that.</p>
  <p><a href="https://i.stack.imgur.com/QGzh0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QGzh0.png" alt="Example for a &quot;Duplicate&quot; button that creates a new object with prepopulated fields based on previous object" /></a></p>