Skip to content

Instantly share code, notes, and snippets.

@a1tus
Created September 5, 2014 00:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save a1tus/abe1d9ffa756cf83a968 to your computer and use it in GitHub Desktop.
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):
pass
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