#1905 closed enhancement (wontfix)
[patch] manage.py validate exception when you forget to remove comma
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When upgrading to post-magic-removal merge, forgetting to remove the pesky comma here
class Admin: list_display = ('owner','name'),
will give you
Traceback (most recent call last): File "manage.py", line 11, in ? execute_manager(settings) File "/usr/lib/python2.4/site-packages/django/core/management.py", line 1241, in execute_manager execute_from_command_line(action_mapping) File "/usr/lib/python2.4/site-packages/django/core/management.py", line 1167, in execute_from_command_line action_mapping[action]() File "/usr/lib/python2.4/site-packages/django/core/management.py", line 948, in validate num_errors = get_validation_errors(outfile) File "/usr/lib/python2.4/site-packages/django/core/management.py", line 894, in get_validation_errors if not hasattr(cls, fn): TypeError: hasattr(): attribute name must be string
A more friendly message would be helpful...
Attachments (1)
Change History (3)
by , 19 years ago
Attachment: | comma.diff added |
---|
comment:1 by , 19 years ago
Summary: | manage.py validate exception when you forget to remove comma → [patch] manage.py validate exception when you forget to remove comma |
---|
comment:2 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This seems to be too much of a special-casish bit of logic.