Skip to content

Instantly share code, notes, and snippets.

Created September 5, 2014 00:11
What would you like to do?
Django 1.7 - DisallowedModelAdminToField
class Inline(admin.TabularInline):
model = B.items.through
class A_Admin(admin.ModelAdmin):
inlines = (Inline,)
class B_Admin(admin.ModelAdmin):
exclude = ('items',)
inlines = (Inline,)
class A(models.Model):
class B(models.Model):
items = models.ManyToManyField(A)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment