In [1]: from editor.models import * In [4]: from subscriptions.models import * In [5]: template = StockTemplate.objects.create(name=\'Template 1\') In [6]: template Out[
The problem here is you need call the method save for both objects before add:
template.save() plan.save() plan.templates.add(template)
Django can not add a template of a plan if none of that objects don't have an id