Cleaned up a repr() hack that caused problems on Python3.

This commit is contained in:
Russell Keith-Magee 2014-03-04 09:50:09 +08:00
parent 53c576452e
commit 20da67d325
1 changed files with 1 additions and 4 deletions

View File

@ -534,10 +534,7 @@ class ModelAdminChecks(BaseModelAdminChecks):
def _check_inlines_item(self, cls, model, inline, label):
""" Check one inline model admin. """
# HACK: This is a nasty hack, but because inlines use the
# RenameBaseModelAdminMethod metaclass, it's almost impossible
# to get the *actual* class name for output purposes.
inline_label = repr(inline)[8:-2]
inline_label = '.'.join([inline.__module__, inline.__name__])
from django.contrib.admin.options import BaseModelAdmin