You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
classAllergy(models.Model):
name=models.CharField(max_length=100)
classProfile(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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: