djangosnippets.org: Latest snippets tagged with 'many2many'http://djangosnippets.org/tags/many2many/2018-10-12T11:13:54.203739-05:00Hand over model instance relations to another instance of the same model
2018-10-12T11:13:54.203739-05:00karolyihttp://djangosnippets.org/snippets/10654/<p>If you have a model instance you want to merge into another, it's handy to hand over all the relations into the model you want to merge into, so the deletion won't trigger cascading deletions from other tables.</p>
<p>You can pass an <code>Iterable</code> of the same objects (a.k.a <code>QuerySet</code>) …</p>
Freely redistributableMany2Many comma separated form field
2010-01-31T15:22:43.128008-06:00haloweenhttp://djangosnippets.org/snippets/1903/<p>Useful in sumbiting data .
Remember to use form.save_m2m() :)</p>
Freely redistributable