#16327: "save as new" redirects to list view instead of newly-created item -----------------------+------------------------------- Reporter: candlerb | Owner: nobody Type: Bug | Status: new Milestone: | Component: contrib.admin Version: 1.3 | Severity: Normal Keywords: saveasnew | Triage Stage: Unreviewed Has patch: 1 | Easy pickings: 0 UI/UX: 0 | -----------------------+------------------------------- I have a model with `save_as = True`
After browsing to the model, changing some parameters and clicking "Save As", the browser redirects to the list of all objects instead of the newly-saved model instance. There is code in `response_change` which looks like it is supposed to handle this case. However, after putting in some sys.stderr.write's, I see that the request is actually ending up in `response_add` instead :-( The attached one-line patch to django/contrib/admin/options.py fixes it for me. However I'm not sure if that's right for all circumstances, nor whether the code in response_change which tests for `"_saveasnew"` is always unused and should also be removed. -- Ticket URL: <https://code.djangoproject.com/ticket/16327> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.