kopia lustrzana https://github.com/wagtail/wagtail
Add the `alters_data` attribute on `Page.copy()`.
This makes sure the variable can't be printed in the template, performing an accidental copy of the page. That also happened when using the `{% print %}` tag from my django-debugtools packagepull/3190/head
rodzic
ba4119bd26
commit
f960753d74
|
@ -33,6 +33,7 @@ Changelog
|
|||
* Fix: `search_garbage_collect` management command now works when wagtailsearchpromotions is not installed (Morgan Aubert)
|
||||
* Fix: `wagtail.contrib.settings` context processor no longer fails when `request.site` is unavailable (Diederik van der Boor)
|
||||
* Fix: `TableBlock` content is now indexed for search (Morgan Aubert)
|
||||
* Fix: `Page.copy()` is now marked as `alters_data`, to prevent template code from triggering it (Diederik van der Boor)
|
||||
|
||||
|
||||
1.7 (20.10.2016)
|
||||
|
|
|
@ -64,6 +64,7 @@ Bug fixes
|
|||
* ``search_garbage_collect`` management command now works when wagtailsearchpromotions is not installed (Morgan Aubert)
|
||||
* ``wagtail.contrib.settings`` context processor no longer fails when ``request.site`` is unavailable (Diederik van der Boor)
|
||||
* ``TableBlock`` content is now indexed for search (Morgan Aubert)
|
||||
* Fix: ``Page.copy()`` is now marked as ``alters_data``, to prevent template code from triggering it (Diederik van der Boor)
|
||||
|
||||
|
||||
Upgrade considerations
|
||||
|
|
|
@ -1182,6 +1182,8 @@ class Page(six.with_metaclass(PageBase, AbstractPage, index.Indexed, Clusterable
|
|||
|
||||
return page_copy
|
||||
|
||||
copy.alters_data = True
|
||||
|
||||
def permissions_for_user(self, user):
|
||||
"""
|
||||
Return a PagePermissionsTester object defining what actions the user can perform on this page
|
||||
|
|
Ładowanie…
Reference in New Issue