Permalink
Browse files

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
  • Loading branch information...
1 parent b5a6ff5 commit 67d490a61dc5ee42b972f6c64bf589fbfc8db83f @adrianholovaty adrianholovaty committed Oct 28, 2005
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/contrib/admin/views/doc.py
View
4 django/contrib/admin/views/doc.py
@@ -288,9 +288,9 @@ def get_return_data_type(func_name):
def get_readable_field_data_type(field):
# 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()
- 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=''):
"""

0 comments on commit 67d490a

Please sign in to comment.