Opened 5 years ago

Closed 5 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:

Description

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

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