Skip to content

Commit

Permalink
Improved error handling for invalid model parameters that aren't cust…
Browse files Browse the repository at this point in the history
…om functions.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Aug 15, 2005
1 parent e004d2a commit 4a71598
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions django/core/meta/__init__.py
Expand Up @@ -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
Expand Down

0 comments on commit 4a71598

Please sign in to comment.