class m2mForm(forms.ModelForm): """ m2m_field = Fieldname of your m2m Field m2m_fields = supports multiple m2m Fields """ m2m_field = '' m2m_fields = [] def save(self, commit=True): """ Saving m2m """ instance = super(m2mForm, self).save(commit=True) if self.m2m_field: self.m2m_fields = [self.m2m_field] for field in self.m2m_fields: m2mfield = getattr(instance, field) for obj in self.cleaned_data.get(field): m2mfield.add(obj) if commit: instance.save() #self.save_m2m() return instance