Is there a way to exclude a field from a nested relation using the create_schema function? Or is there another way to generate a schema that excludes a field from a nested relation?
Consider the following models:
class Allergy(models.Model):
name = models.CharField(max_length=100)
class Profile(models.Model):
allergies = models.ManyToManyField(Allergy, blank=True, null=True)
ProfileInput = create_schema(
Profile,
depth=1,
exclude=["allergies__id"] # I want something like this or allergies.id
)
Is there a way to do this at the moment using create_schema or some other means?
Is there a way to exclude a field from a nested relation using the
create_schema
function? Or is there another way to generate a schema that excludes a field from a nested relation?Consider the following models:
Is there a way to do this at the moment using create_schema or some other means?