Skip to content Skip to sidebar Skip to footer

Django Workflow To Convert Model Superclass To Subclass

I have a Django project with two models: Applicant and Client, where Client is a subclass of Applicant. I would like some way of allowing a user to add an existing Applicant instan

Solution 1:

You can create a Client instance from an existing Applicant instance with the following code:

client = Client(applicant_ptr=applicant)
client.save_base(raw=True)

Post a Comment for "Django Workflow To Convert Model Superclass To Subclass"