#15685 closed Bug (invalid)
Server keeps displaying error after I enter reverse() in forms.py then remove it
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | 1.2 |
| Severity: | Normal | Keywords: | runserver, |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I have my app, textbook. In my forms.py when I change this line:
ISBN = forms.CharField(label = "ISBN", max_length=20)
to this:
ISBN = forms.CharField(label = "ISBN", max_length=20,
help_text="<a href='%s'>My book doesn't have an ISBN.</a>" % (reverse('post_details')))
it raises the ImproperlyConfigured exception:
The included urlconf textbook.urls doesn't have any patterns in it.
The problem is that when I change the line back to how it was:
It still gives me the exception until I restart the server at which point it starts working again.
Change History (5)
comment:1 by , 15 years ago
| Component: | django-admin.py runserver → Core (Management commands) |
|---|
comment:2 by , 15 years ago
| Type: | → Bug |
|---|
comment:3 by , 15 years ago
| Severity: | → Normal |
|---|
comment:4 by , 15 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
The issue most likely is that you're importing the module that contains this form *before* the url patterns are loaded. I don't think there's a bug in Django here -- I advise you to ask for help in the django-users list: http://groups.google.com/group/django-users