Clarify InlineModelAdmin documentation
|Reported by:||Joseph Long||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I was just stuck for hours with InlineModelAdmins. I don't often blame the docs, but in this case I genuinely believe they can be made better. I assumed, from the line on http://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-options saying "The InlineModelAdmin class is a subclass of ModelAdmin so it inherits all the same functionality as well as some of its own:
" that I was supposed to use admin.site.register() to register my InlineModelAdmin classes as I would a normal ModelAdmin class. As I later learned, defining 'model = ' on the InlineModelAdmin makes registering unnecessary. Ideally, the fact that InlineModelAdmins need not be registered would be noted either at the top of the InlineModelAdmin section or perhaps as an explanatory addition to http://docs.djangoproject.com/en/dev/ref/contrib/admin/#model
Hopefully this will save others some trouble!
(In a separate but related note, the exceptions and behavior one gets when mistakenly admin.site.register()ing an InlineModelAdmin class are completely mystifying. I don't know what the Django policy is for when it's prudent to add checks and exceptions for improper configuration, but one there would have saved me a lot of head-scratching)