Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 67d490a61dc5ee42b972f6c64bf589fbfc8db83f 1 parent b5a6ff5
Adrian Holovaty authored October 28, 2005

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/contrib/admin/views/doc.py
4  django/contrib/admin/views/doc.py
@@ -288,9 +288,9 @@ def get_return_data_type(func_name):
288 288
 
289 289
 def get_readable_field_data_type(field):
290 290
     # ForeignKey is a special case. Use the field type of the relation.
291  
-    if field.__class__.__name__ == 'ForeignKey':
  291
+    if field.get_internal_type() == 'ForeignKey':
292 292
         field = field.rel.get_related_field()
293  
-    return DATA_TYPE_MAPPING[field.__class__.__name__] % field.__dict__
  293
+    return DATA_TYPE_MAPPING[field.get_internal_type()] % field.__dict__
294 294
 
295 295
 def extract_views_from_urlpatterns(urlpatterns, base=''):
296 296
     """

0 notes on commit 67d490a

Please sign in to comment.
Something went wrong with that request. Please try again.