Fixed #701 -- contrib.admin.views.doc now uses get_internal_type()

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-10-28 03:48:33 +00:00
parent b5a6ff5bdd
commit 67d490a61d
1 changed files with 2 additions and 2 deletions

View File

@ -288,9 +288,9 @@ DATA_TYPE_MAPPING = {
def get_readable_field_data_type(field): def get_readable_field_data_type(field):
# ForeignKey is a special case. Use the field type of the relation. # ForeignKey is a special case. Use the field type of the relation.
if field.__class__.__name__ == 'ForeignKey': if field.get_internal_type() == 'ForeignKey':
field = field.rel.get_related_field() field = field.rel.get_related_field()
return DATA_TYPE_MAPPING[field.__class__.__name__] % field.__dict__ return DATA_TYPE_MAPPING[field.get_internal_type()] % field.__dict__
def extract_views_from_urlpatterns(urlpatterns, base=''): def extract_views_from_urlpatterns(urlpatterns, base=''):
""" """