Various docs tweaks

Thanks @tomdyson for spotting!
pull/3053/head
Karl Hobley 2016-06-17 10:09:58 +01:00 zatwierdzone przez Matt Westcott
rodzic a449e2d8b2
commit 2a6f908972
3 zmienionych plików z 13 dodań i 7 usunięć

Wyświetl plik

@ -203,9 +203,9 @@ Output image format
Wagtail may automatically change the format of some images when they are resized:
- PNG and JPEG images always won't change format
- PNG and JPEG images don't change format
- GIF images without animation are converted to PNGs
- BMP images are always converted to PNGs
- BMP images are converted to PNGs
It is also possible to override the output format on a per-tag basis by using the
``format`` filter after the resize rule.
@ -237,8 +237,15 @@ quality:
# Make low-quality but small images
WAGTAILIMAGES_JPEG_QUALITY = 40
Note that this won't affect any previously generated images. You may want to
delete all renditions so they can regenerate with the new setting.
Note that this won't affect any previously generated images so you may want to
delete all renditions so they can regenerate with the new setting. This can be
done from the Django shell:
.. code-block:: python
# Replace this with your custom rendition model if you use one
>>> from wagtail.wagtailimages.models import Rendition
>>> Rendition.objects.all().delete()
Changing per-tag
^^^^^^^^^^^^^^^^

Wyświetl plik

@ -417,8 +417,7 @@ class Filter(models.Model):
'original-format': original_format,
}
for operation in self.operations:
# Check that the operation can take the new "env" argument
# (added in Wagtail 1.5)
# Check that the operation can take the "env" argument
try:
inspect.getcallargs(operation.run, willow, image, env)
accepts_env = True

Wyświetl plik

@ -414,7 +414,7 @@ class TestFilter(TestCase):
self.assertEqual(run_mock.call_count, 2)
def test_runs_operations_without_env_argument(self):
# The "env" argument was added in Wagtial 1.5. This tests that
# The "env" argument was added in Wagtail 1.5. This tests that
# image operations written for 1.4 will still work
run_mock = Mock()