Code

Opened 5 years ago

Closed 5 years ago

#11375 closed (wontfix)

Redirect to another url in admin add view

Reported by: slurms Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I've got a form on an AdminSite app_index view that submits to a ModelAdmin add_view. I have taken care of setting up the form in such a way that it submits to the add_view fine, but I'd like to be able to redirect back to the AdminSite's app_index rather than the ModelAdmin's changelist or anything else.

Attachments (1)

response-add-redirect.diff (513 bytes) - added by slurms 5 years ago.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by slurms

comment:1 Changed 5 years ago by dc

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Maybe better add another argument to the response_add() because it already has post_url_continue.

comment:2 Changed 5 years ago by lukeplant

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

The normal way to achieve this is by overriding ModelAdmin.response_add. Therefore closing WONTFIX.

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.