Edit tables

How do you edit one-to-one fields in an edit table?

Include them in auto__include. Say you have a profile model for an artist:

profile = Profile.objects.create(artist=black_sabbath)

Then you can include the artist name field:

edit_table = EditTable(
    auto__model=Profile,
    auto__include=['artist__name'],
    columns__artist_name__field__include=True,
)
▼ Hide result