Previously, we added an extra validation rule to the slug field by overriding the clean_slug method on the page, which was a little hacky I think.
This PR removes this code and uses form.add_error instead (added in Django 1.7) for performing the extra validation rules.
By default the collapsible blocks will be hidden after saving or from preview.
When there is a form error inside one of these blocks, the block is hidden and the user does not know where the form errors are located.
This script supports 'get', 'put' and 'vi' commands to edit the file at
http://releases.wagtail.io/latest.txt. Usage is fairly straightforward:
$ scripts/latest.sh get my-latest.txt
$ vi my-latest.txt
$ scripts/latest.sh put my-latest.txt
Or, in a single command (equivalent to get, vi and put):
$ scripts/latest.sh vi
'put' will automatically create a CloudFront invalidation, that
typically takes around 15 minutes to fully deploy
TODO: documentation; script to create a template latest.txt based on
command-line arguments.
The fonts were also relocated out of the `scss/fonts` directory to their
own `fonts` directory.
All the `static` directories are now ignored, and are completely
generated from the compilation process.
Depending on libsass for all Wagtail installations was causing issues
with various operating systems, dramatically increasing installation
times, and preventing front end development adopting modern practices.
libsass has been removed as a dependency. Sass files are compiled before
release as a dependency of the `sdist` setup command. Sass compilation
is done through `gulp`. People wishing to hack on the frontend assets
should now install wagtail locally, install the node dependencies, and
run `gulp`:
$ pip install -e path/to/wagtail
$ cd path/to/wagtail
$ npm install
$ npm start
All the templates and JS files have been updated to reference the new
compiled CSS files instead of the Sass files.
Precompiled CSS for jquery-ui and similar have been moved out of the
`scss/` directory to the `css/` directory.
This commit enables the use of required and help_text as parameters to
the RichTextBlock constructor. Unit tests for required=True and
required=False are included in this commit.