Ticket #701: patch.diff

File patch.diff, 623 bytes (added by jkocherhans@…, 19 years ago)
  • django/contrib/admin/views/doc.py

     
    290290    # ForeignKey is a special case. Use the field type of the relation.
    291291    if field.__class__.__name__ == 'ForeignKey':
    292292        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__
    294294
    295295def extract_views_from_urlpatterns(urlpatterns, base=''):
    296296    """
Back to Top