Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#15685 closed Bug (invalid)

Server keeps displaying error after I enter reverse() in forms.py then remove it

Reported by: hgezim@… 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: UI/UX:

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.

Attachments (0)

Change History (5)

comment:1 Changed 3 years ago by gabrielhurley

  • Component changed from django-admin.py runserver to Core (Management commands)

comment:2 Changed 3 years ago by lukeplant

  • Type set to Bug

comment:3 Changed 3 years ago by lukeplant

  • Severity set to Normal

comment:4 Changed 3 years ago by julien

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to 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

comment:5 Changed 3 years ago by jacob

  • milestone 1.4 deleted

Milestone 1.4 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.