class Person(models.Model):
name = models.Charfield(max_length=120)
class Group(models.Model):
title = models.Charfield(max_length=120)
persons = models.ManyToManyField(Person)
from .models import Group
class GroupInline(admin.TabularInline):
model = Group.persons.through
extra = 1
class PersonAdmin(admin.ModelAdmin):
inlines = [GroupInline]
admin.site.register(Person, PersonAdmin)