Opened 6 years ago

Closed 6 years ago

#14495 closed (fixed)

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

Reported by: Honza Král 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.

Change History (2)

comment:1 Changed 6 years ago by Honza Král

Needs documentation: unset
Needs tests: set
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 6 years ago by Honza Král

Resolution: fixed
Status: newclosed

(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.

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