Opened 4 years ago

Closed 4 years ago

#14495 closed (fixed)

get_success_url raises ImproperlyConfigured with wrong message in some class based generic views' mixins

Reported by: Honza_Kral Owned by: nobody
Component: Generic views Version: master
Severity: Keywords: generic views get_absolute_url get_success_url success_url
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:


For example FormMixin and DeletionMixin complain:

"No URL to redirect to.  Either provide a url or define a get_absolute_url method on the Model."

but they don't actually check if the Model has a get_absolute_url method.

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by Honza_Kral

  • Needs documentation unset
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by Honza_Kral

  • Resolution set to fixed
  • Status changed from new to closed

(In [14284]) Fixed #14495 -- DeletionMixin and FormMixin don't have an object to work with so they cannot redirect to get_absolute_url and shouldn't claim they do.

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.