[Django] #22736: Preserve POPUP state when using 'save and continue' from model change form inside POPUP?

21 views
Skip to first unread message

Django

unread,
May 30, 2014, 1:52:27 PM5/30/14
to django-...@googlegroups.com
#22736: Preserve POPUP state when using 'save and continue' from model change form
inside POPUP?
-------------------------+-------------------------------------------------
Reporter: sthzg@… | Owner: nobody
Type: | Status: new
Uncategorized | Version: 1.6
Component: | Keywords: admin, popup, change form,
contrib.admin | _continue
Severity: Normal | Has patch: 0
Triage Stage: | UI/UX: 0
Unreviewed |
Easy pickings: 0 |
-------------------------+-------------------------------------------------
When showing an admin change form inside a popup (opened with "return
showAddAnotherPopup()") and using the 'save and continue' behavior
(name="_continue" on the submit button) the popup context is lost in the
redirect in contrib.admin.options.py, ln 972.

Would you consider this as unexpected behavior and if so, would it be
interesting to preserve that state?

--
Ticket URL: <https://code.djangoproject.com/ticket/22736>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 24, 2014, 10:00:34 AM6/24/14
to django-...@googlegroups.com
#22736: Preserve POPUP state when using 'save and continue' from model change form
inside POPUP?
-------------------------------------+-------------------------------------
Reporter: sthzg@… | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin, popup, | Triage Stage:
change form, _continue | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timo):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

How do you get a save and continue button on the pop-up? Are you using a
custom template? I don't think the pop-up is really designed to be used
like that.

--
Ticket URL: <https://code.djangoproject.com/ticket/22736#comment:1>

Django

unread,
Jun 24, 2014, 10:25:41 AM6/24/14
to django-...@googlegroups.com
#22736: Preserve POPUP state when using 'save and continue' from model change form
inside POPUP?
-------------------------------------+-------------------------------------
Reporter: sthzg@… | Owner: nobody

Type: Uncategorized | Status: new
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin, popup, | Triage Stage:
change form, _continue | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by sthzg):

Yes, I customized it to achieve this behavior. It makes more sense in my
use case than returning to the change list (or closing the popup right
away after saving). I thought it would be nice if the popup context
remained in that scenario as well.

--
Ticket URL: <https://code.djangoproject.com/ticket/22736#comment:2>

Django

unread,
Jun 24, 2014, 10:59:00 AM6/24/14
to django-...@googlegroups.com
#22736: Preserve POPUP state when using 'save and continue' from model change form
inside POPUP?
-------------------------------------+-------------------------------------
Reporter: sthzg@… | Owner: nobody

Type: Uncategorized | Status: new
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin, popup, | Triage Stage:
change form, _continue | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by sthzg):

Replying to [comment:1 timo]:

> How do you get a save and continue button on the pop-up? Are you using a
custom template? I don't think the pop-up is really designed to be used
like that.

Sorry, I wrote an answer (comment [comment:2]) but added a new comment
instead of hitting the reply button.

--
Ticket URL: <https://code.djangoproject.com/ticket/22736#comment:3>

Django

unread,
Jun 24, 2014, 12:12:49 PM6/24/14
to django-...@googlegroups.com
#22736: Preserve POPUP state when using 'save and continue' from model change form
inside POPUP?
-------------------------------------+-------------------------------------
Reporter: sthzg@… | Owner: nobody

Type: Uncategorized | Status: new
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin, popup, | Triage Stage:
change form, _continue | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timo):

What do you mean by "popup context"? Did you have a look if overriding
`templates/admin/popup_response.html` might help? There's JavaScript logic
there which closes the popup if that's what you're trying to avoid.

--
Ticket URL: <https://code.djangoproject.com/ticket/22736#comment:4>

Django

unread,
Jun 28, 2014, 10:26:43 AM6/28/14
to django-...@googlegroups.com
#22736: Preserve POPUP state when using 'save and continue' from model change form
inside POPUP?
-------------------------------------+-------------------------------------
Reporter: sthzg@… | Owner: nobody
Type: Uncategorized | Status: closed
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution: needsinfo

Keywords: admin, popup, | Triage Stage:
change form, _continue | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timo):

* status: new => closed
* resolution: => needsinfo


--
Ticket URL: <https://code.djangoproject.com/ticket/22736#comment:5>

Reply all
Reply to author
Forward
0 new messages