Matt Westcott
46e5dbb5b0
Release note for #6322
2020-08-17 16:58:18 +01:00
Dan Braghis
06d4e2e0ac
Add tests for create_log_entries_from_revisions
2020-08-17 16:58:18 +01:00
Dan Braghis
6837d2d512
Avoid creating log entries for revisions without page types
2020-08-17 16:58:18 +01:00
Matt Westcott
58f5c29252
Add release note sections for 2.10.1
2020-08-17 16:58:18 +01:00
Matt Westcott
cc2777c5cf
Avoid setting self.content_type on page CreateView / EditView
...
Fix regression in #6306 - an instance variable `self.content_type` will be picked up by TemplateResponseMixin as the MIME content type for the response. Use `page_content_type` to avoid this.
2020-08-17 15:02:20 +01:00
Matt Westcott
b9a784adf0
Lint fix
2020-08-13 15:12:09 +01:00
Matt Westcott
8a4756a592
Add helper functions for message buttons
2020-08-13 15:00:03 +01:00
Matt Westcott
a8fffb35c4
move save confirmation message into a helper method
2020-08-13 15:00:03 +01:00
Matt Westcott
afb6baa447
Move save action into its own method
2020-08-13 15:00:03 +01:00
Matt Westcott
e3bb97d0ed
Move cancel-workflow action into its own method
2020-08-13 15:00:03 +01:00
Matt Westcott
8dcc7b7e9a
Move perform-workflow-action into its own method
2020-08-13 15:00:03 +01:00
Matt Westcott
8bb90ffaf2
Move restart-workflow action into its own method
2020-08-13 15:00:03 +01:00
Matt Westcott
9d584a20dc
Move submit action into its own method
2020-08-13 15:00:03 +01:00
Matt Westcott
008ca877da
Move publish action into its own method
2020-08-13 15:00:03 +01:00
Matt Westcott
27fa89c430
Move redirect responses into their own methods
2020-08-13 15:00:03 +01:00
Matt Westcott
15afbac957
Move run_hooks helper to a mixin and use it for EditView hooks
2020-08-13 15:00:03 +01:00
Matt Westcott
edb87b1cd9
Reorder variable-setting in EditView.form_valid in preparation for splitting into separate methods per action
2020-08-13 15:00:03 +01:00
Matt Westcott
74e6c497e1
Split EditView.post into form_valid and form_invalid methods
2020-08-13 15:00:03 +01:00
Matt Westcott
badab7b059
Move all is_valid / not is_valid cases into a single branch
...
is_publishing, is_submitting, is_restarting_workflow and is_reverting are now only used inside the is_valid branch, so the initial setup to set them to False can be removed.
2020-08-13 15:00:03 +01:00
Matt Westcott
4ec8d59b88
Refactor EditView.post into is_valid and not is_valid code paths
...
A bit of intermediate refactoring to make it clearer what the next step is doing...
is_saving is true in the code paths where the form is valid and unlocked, so rename this condition to is_valid. cancel_workflow is the one action that is allowed while is_valid is false, so split that into identical "cancel workflow while valid" and "cancel workflow while invalid" cases. This way, all code paths are cleanly partitioned into is_valid and (not is_valid) branches, which we can reorganise in the next step.
2020-08-13 15:00:03 +01:00
Matt Westcott
bca74c41e2
Split EditView into get and create methods
2020-08-13 15:00:03 +01:00
Matt Westcott
8795ec94f6
Move moderation warning and page_for_status into helper functions
2020-08-13 15:00:03 +01:00
Matt Westcott
512b3a7e75
Reshuffle and deduplicate shared code between GET and POST branches
2020-08-13 15:00:03 +01:00
Matt Westcott
7cabaede6b
Use TemplateResponseMixin / ContextMixin for EditView
2020-08-13 15:00:03 +01:00
Matt Westcott
be7f7eb660
Make various local variables in EditView into instance variables
2020-08-13 15:00:03 +01:00
Matt Westcott
cfdc7da4aa
Add helper functions for message buttons
2020-08-13 15:00:03 +01:00
Matt Westcott
6f8b2eaa99
Split save/publish/submit actions into their own methods
2020-08-13 15:00:03 +01:00
Matt Westcott
4fd6410094
Move post-success redirections into helper methods
2020-08-13 15:00:03 +01:00
Matt Westcott
a011a5eb73
Move CreateView hook calls into a helper method
2020-08-13 15:00:03 +01:00
Matt Westcott
893c49c4a3
Split up CreateView.post into form_valid and form_invalid methods
2020-08-13 15:00:03 +01:00
Matt Westcott
7aeca637ce
Split up CreateView into post and get methods
2020-08-13 15:00:03 +01:00
Matt Westcott
39237bbada
Use TemplateResponseMixin / ContextMixin for CreateView
2020-08-13 15:00:03 +01:00
Matt Westcott
a21908d42c
Make various local variables in CreateView into instance variables
2020-08-13 15:00:03 +01:00
Matt Westcott
dd72949bf1
Make page create view into a class-based view
2020-08-13 15:00:03 +01:00
Matt Westcott
c2a08b9d16
Make page edit view into a class-based view
2020-08-13 15:00:03 +01:00
Matt Westcott
7d7030747d
Remove wildcard imports from wagtail.admin.views.pages
2020-08-13 15:00:03 +01:00
Karl Hobley
8eb895347a
Don't ignore flake8 errors D200 through D402
...
D200: One-line docstring should fit on one line with quotes
D202: No blank lines allowed after function docstring
D204: 1 blank line required after docstring
D205: 1 blank line required between summary line and description
D209: Multi-line docstring closing quotes should be on a separate line
No occurances of any of these exist in Wagtail at the moment
2020-08-11 13:15:28 +01:00
Karl Hobley
64d5fe0b66
Stop ignoring Flake8 First argument of a method should be named 'self'
...
Already no breakages of this rule in the whole of Wagtail!
2020-08-11 13:15:28 +01:00
Karl Hobley
2c8ec6336a
Fix all E303: Too many blank lines
Flake8 errors
...
I think this is quite a useful rule to have. It makes flake8 check that the spacing between module level things and class methods are consistent.
2020-08-11 11:28:10 +01:00
Matt Westcott
f1959717e9
Fill in release date for 2.10
2020-08-11 10:30:26 +01:00
Matt Westcott
af47fa29dc
Fetch new translations from Transifex
2020-08-11 10:29:26 +01:00
Robbie Mackay
437e3b9258
Replace unidecode with anyascii in wagtail.core.utils.string_to_ascii
...
- Add anyascii to replace unidecode
- Update wagtail.core.utils.string_to_ascii to use anyascii.
- Anyascii has a similar but not exactly the same encoding - see updates to tests.
Refs https://github.com/wagtail/wagtail/issues/3311
2020-08-07 17:48:58 +01:00
Matt Westcott
bb3243b9a9
Use https oembed endpoints where available
...
Fixes #6288
Many of the oembed endpoints currently listed with an http:// URL now redirect to https://. Changing these to https:// saves a redundant redirect and avoids failures where the http URL has been blocked (see #6288 ). Also simplified the patterns for matching http or https - the group in `http(?:s)?` is redundant and should just be `https?`.
2020-08-07 17:36:05 +01:00
Matt Westcott
8542f5fe9c
Fix underline lengths to prevent Sphinx warnings
2020-08-07 17:23:42 +01:00
jacobtoppm
c654f0d71a
Fix bulletpoint formatting, and update outdated information, particularly around available page statuses and the headings on the workflow edit view
2020-08-07 17:10:27 +01:00
jacobtoppm
5d8caaf096
Update editor manual images where they show the old edit/workflow admin views before revamp
2020-08-07 17:10:26 +01:00
jacobtoppm
e85f16b500
Add a use case example for WAGTAIL_WORKFLOW_CANCEL_ON_PUBLISH=False
2020-08-07 17:10:24 +01:00
jacobtoppm
b10b24a7b6
Update descriptions of the editing interface and workflow management for consistency. Note that screenshots are not yet updated
2020-08-07 17:10:23 +01:00
Matt Westcott
95c0a29aaf
Rebuild wagtailadmin strings to include 'By Workflow' ( #6303 )
2020-08-07 16:13:04 +01:00
Martin Sandström
2a591fae89
Add missing translation for workflow ( #6303 )
2020-08-07 16:02:20 +01:00