Opened 11 years ago

Closed 11 years ago

#7909 closed (duplicate)

newforms errors are a little ambiguous

Reported by: dthole Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Here is the setup that I'm using right now:






What happened this evening was a typo, but the resulting error message was incredibly vague. Here is the relevant code, including the error I created:

app/ does not have any reference to the newforms, but the views obviously do.


class Search(form.Form):


The resulting error was the following:

ImproperlyConfigured at /

Error while importing URLconf '': name 'form' is not defined


/usr/lib/python2.5/site-packages/django/core/handlers/ in get_response

/usr/lib/python2.5/site-packages/django/core/ in resolve

/usr/lib/python2.5/site-packages/django/core/ in resolve

/usr/lib/python2.5/site-packages/django/core/ in _get_urlconf_module

This is with the current version of SVN (updated before the ticket).

To reproduce the problem:

  1. Misspell forms to form
  1. Run runserver

I'll probably branch this into my own tree for now and can provide more information if required. I personally feel that the error seems to point to the wrong place. Since the form is probably imported in this area, that's where the error happens. Which, totally makes sense. doesn't import this file, but other files that do import will import this file. I'm not sure if there's a good way to fix it, but I figured I'd bring it up since I can tell it'd definitely be a source of frustration for some.

Change History (1)

comment:1 Changed 11 years ago by Brian Rosner

Resolution: duplicate
Status: newclosed

Duplicate of #7524.

Note: See TracTickets for help on using tickets.
Back to Top