Django — Has no attribute ‘get_formset’


Chances are, you accidentally subclassed admin.ModelAdmin for a class passed as an inline.

Inlines should subclass the inline admin classes: TabularInline or StackedInline


5 thoughts on “Django — Has no attribute ‘get_formset’

  1. Hah, awesome! Quick fix. Nice post, perfect answer. Had your answer not been in the top of the Google search results, I may have spent hours looking for this.

    1. Glad to hear it helped! I never know if people are reading these things. I post them and run into them myself… haha. I like where Django is going with 1.8+ – lots of validation support. They should add common mistakes like this. But it’s a tough call how to implement (code bloat), whether to use type checks or allow duck type but show suggestions on errors. Real interesting stuff.

      Wonder how hard it is to lint django specific patterns?

      Anyways, enjoy.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s