Opened 12 years ago
Closed 11 years ago
#19773 closed Cleanup/optimization (fixed)
Moving the response after a popup submission to a template so that it can be overwritten.
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Currently, after a popup submission (e.g. adding another User thur the "+" link in django admin), the response is
'<!DOCTYPE html><html><head><title></title></head><body>'
'<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script></body></html>' % \
# escape() calls force_unicode.
(escape(pk_value), escapejs(obj)))
Can this be changed so that it is loaded from a template file? And so, the template file can then be overwritten.
Since most browsers are having more strict cross-site pop-up windows security checking and my site are being loaded from different subdomains. In order to make them work together, i have to add the javascript
'document.domain = 'mydomain.com' in the templates, including the admin templates.
However, the above response can't be modified or overwritten because it's part of the code within the response_add method of ModelAdmin.
Change History (4)
comment:1 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 12 years ago
Submitted pull request https://github.com/django/django/pull/853 doing the needed changes.
comment:3 by , 12 years ago
Has patch: | set |
---|
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Sure, this would be a good improvement.