Changes between Version 11 and Version 12 of BetterErrorMessages


Ignore:
Timestamp:
Jun 8, 2006, 8:18:53 AM (18 years ago)
Author:
pb@…
Comment:

minor edits, added refs to two relevant wiki pages

Legend:

Unmodified
Added
Removed
Modified
  • BetterErrorMessages

    v11 v12  
    11= Better Error Messages =
    22
    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 
    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.)
     3Good error messages make for more productive developers. 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.
    64
    75Some 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.
     
    97For 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.
    108
     9Also see:
     10
     11 * CommonPitfalls
     12 * NewbieMistakes
    1113
    1214== django.db ==
     
    3335EnvironmentError: Could not import settings 'foo.settings' (Is it on sys.path? Does it have syntax errors?): No module named settings
    3436}}}
    35 '''Context:''' Application name is same as project name, causing import problems. (See #1908 for full example.)
    36 '''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]]
     37'''Context:''' Application name is same as project name, causing import problems. (See #1908 for full example.)[[BR]]
     38'''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.
    3739
    3840 * Ticket #1791 suggests better error messages in cases where application dependencies are not satisfied.
    3941
    4042{{{
    41 TypeError at /mlsuploadform/
     43TypeError at ...
    4244string indices must be integers
    4345}}}
    44 '''Context:''' A FileUploadField is being validated but the form did not have enctype="multipart/form-data" set.
    45 
    46 Also, the main debug page shows GET and POST but not FILES.
     46'''Context:''' A FileUploadField is being validated but the form did not have enctype="multipart/form-data" set.[[BR]]
     47'''Suggestion''': Check form enctype during validation? Show FILES in addition to GET and POST on error pages?
    4748
    4849== django.template ==
Back to Top