Changes between Version 7 and Version 8 of BetterErrorMessages
- Timestamp:
- May 17, 2006, 11:06:53 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BetterErrorMessages
v7 v8 1 1 = Better Error Messages = 2 2 3 I'm starting this page as a place to collect error messages that could stand improvement, or which are misleading or confusing in certain contexts. Most of us have had the experience of getting a "weird" message, puzzling it out (perhaps with help from django-users or #django) and then moving on. Later it can be hard to remember what the problem was.3 This page is a place to collect error messages that could stand improvement, or which are misleading or confusing in certain contexts. Most of us have had the experience of getting a "weird" message, puzzling it out (perhaps with help from django-users or #django) and then moving on. Later it can be hard to remember what the problem was. 4 4 5 5 This is an experiment to see if having a dedicated place to describe these cases as we encounter them can help organize a quality-control effort. Good error messages make for more productive developers. (And it helps newbies be more self-supporting, too.) 6 6 7 Some of these may seem like quick patches but I know that others will take a bit of consideration -- that's why the wiki page rather than individual tickets.7 Some of these may seem like quick patches but others will take a bit of consideration -- that's why the wiki page rather than individual tickets. Some are more along the lines of "Django Lint" than simple changes to error output. 8 8 9 9 For now, let's try dividing them into sections by major module. Within those sections suggested format is: error message, explanatory context (often important -- a message that is very helpful in one context can be confusing in another), suggested improvements/changes. … … 28 28 == django.contrib.admin == 29 29 30 Ticket #1732 -- a problem that elicits no error message, but should.31 32 30 {{{ 33 31 'NoneType' object has no attribute 'get_field_sets' … … 36 34 '''Suggestion:''' Check relevant Admin settings during model validation? 37 35 36 * Ticket #1732 -- a problem that elicits no error message, but should. 37 38 38 == django.core == 39 39 40 Ticket #1791 suggests better error messages in cases where application dependencies are not satisfied. 40 {{{ 41 EnvironmentError: Could not import settings 'foo.settings' (Is it on sys.path? Does it have syntax errors?): No module named settings 42 }}} 43 '''Context:''' Application name is same as project name, causing import problems. (See #1908 for full example.) 44 '''Suggestion:''' Given how often beginners are likely to make this mistake, it would be nice for Django to look for this conflict and warn the user.[[BR]] 45 46 * Ticket #1791 suggests better error messages in cases where application dependencies are not satisfied. 41 47 42 48 == django.template == 43 49 44 See [http://groups.google.com/group/django-developers/browse_thread/thread/42aff5c291a69041/d006eb5292b8aac3 this thread on the django-developers list] for discussion of error suppression in the template engine50 * See [http://groups.google.com/group/django-developers/browse_thread/thread/42aff5c291a69041/d006eb5292b8aac3 this thread on the django-developers list] for discussion of error suppression in the template engine