diff options
| author | Brian Rosner <brosner@gmail.com> | 2009-03-29 18:52:38 +0000 |
|---|---|---|
| committer | Brian Rosner <brosner@gmail.com> | 2009-03-29 18:52:38 +0000 |
| commit | 69977d2045ba98918182d1229fc73acae62a2e8e (patch) | |
| tree | a91c06f9d68281bfae19ea04b6da6475e0fdbbd1 /django | |
| parent | f0b7cc4a2331884c29fd431c8bc76c13d9d82d46 (diff) | |
Fixed #10622 -- Resolved an issue with model inheritence and list_editable. Thanks oyvind and Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/admin/templatetags/admin_list.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py index a374bf58f7..21401caf43 100644 --- a/django/contrib/admin/templatetags/admin_list.py +++ b/django/contrib/admin/templatetags/admin_list.py @@ -70,7 +70,7 @@ pagination = register.inclusion_tag('admin/pagination.html')(pagination) def result_headers(cl): lookup_opts = cl.lookup_opts - + for i, field_name in enumerate(cl.list_display): attr = None try: @@ -97,7 +97,7 @@ def result_headers(cl): raise AttributeError, \ "'%s' model or '%s' objects have no attribute '%s'" % \ (lookup_opts.object_name, cl.model_admin.__class__, field_name) - + try: header = attr.short_description except AttributeError: @@ -237,7 +237,7 @@ def items_for_result(cl, result, form): result_repr = conditional_escape(result_repr) yield mark_safe(u'<td%s>%s</td>' % (row_class, result_repr)) if form: - yield mark_safe(force_unicode(form[cl.model._meta.pk.attname])) + yield mark_safe(force_unicode(form[cl.model._meta.pk.name])) def results(cl): if cl.formset: |
