Tweaks to image serve view docs (#2588)

- key => signature
- Added "Advanced configuration" section (the last bit of the docs doesn't really fit into the general usage section above)
-
This commit is contained in:
Karl Hobley 2016-05-10 14:56:12 +01:00
parent 9dcc12ac55
commit 948bdf8d3c

View file

@ -8,8 +8,8 @@ Wagtail provides a view for dynamically generating renditions of images. It can
be called by an external system (eg a blog or mobile app) or used internally as
an alternative to Wagtail's ``{% image %}`` tag.
The view takes an image id, filter spec and security key in the URL. If these
parameters are valid, it serves an image file matching that criteria.
The view takes an image id, filter spec and security signature in the URL. If
these parameters are valid, it serves an image file matching that criteria.
Like the ``{% image %}`` tag, the rendition is generated on the first call and
subsequent calls are served from a cache.
@ -72,9 +72,12 @@ And here's an example of this being used in a view:
image = get_object_or_404(Image, id=image_id)
return render(request, 'display_image.html', {
'url': generate_image_url(image, 'fill-100x100')
'image_url': generate_image_url(image, 'fill-100x100')
})
Advanced configuration
======================
Making the view redirect instead of serve
-----------------------------------------