Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Improved error handling for invalid model parameters that aren't cust…

…om functions.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent e004d2a commit 4a7159865e766cf586ada6f3f73fb5f7504354b8 @adrianholovaty adrianholovaty committed
Showing with 1 addition and 0 deletions.
  1. +1 −0  django/core/meta/
1  django/core/meta/
@@ -464,6 +464,7 @@ def __new__(cls, name, bases, attrs):
for k, v in attrs.items():
if k in ('__module__', '__init__', '_overrides', '__doc__'):
continue # Skip the important stuff.
+ assert callable(v), "%r is an invalid model parameter." % k
# Give the function a function attribute "custom" to designate that
# it's a custom function/method.
v.custom = True

0 comments on commit 4a71598

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