Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2578 -- Give a more accurate error message for admin.list_disp…

…lay_links

at model validation time. Patch from Christopher Lenz.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3790 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit dc39762fde7c9a20f3bcf2025ca2cb46e5c73433 1 parent 9e05fc1
Malcolm Tredinnick authored September 22, 2006

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

  1. 3  django/core/management.py
3  django/core/management.py
@@ -958,7 +958,8 @@ def get_validation_errors(outfile, app=None):
958 958
                         try:
959 959
                             f = opts.get_field(fn)
960 960
                         except models.FieldDoesNotExist:
961  
-                            e.add(opts, '"admin.list_filter" refers to %r, which isn\'t a field.' % fn)
  961
+                            if not hasattr(cls, fn):
  962
+                                e.add(opts, '"admin.list_display_links" refers to %r, which isn\'t an attribute, method or property.' % fn)
962 963
                         if fn not in opts.admin.list_display:
963 964
                             e.add(opts, '"admin.list_display_links" refers to %r, which is not defined in "admin.list_display".' % fn)
964 965
                 # list_filter

0 notes on commit dc39762

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