mysociety/pombola — pull request #1389 by mhl (2014-04-14 12:52:58+00:00)
Title: Allow non-inline editing of AlternativePersonName in the admin

I was seeing a NoReverseMatch error in the admin when viewing the
admin page for a person who has at least one alternative name when
DEBUG = True, where it was trying to get the admin URL for editing
that AlternativePersonName on its own page. This is needed for the
"Edit in admin" link. I couldn't see an easy way to suppress
generation of that link, so it seems easiest to just allow
AlternativePersonName objects to be edited in isolation as well
as inline.

For reasons that I don't understand, you only get this exception
when DEBUG = True. When DEBUG = False, the inline admin for
alternative names is just omitted from the person page if there
would be an error. I can't see in the Django admin code where
this exception is being caught and ignored only when DEBUG is
True, though.