From 8bacb807ccd75e89a11cfc4e955b8cc2ea61d75f Mon Sep 17 00:00:00 2001 From: Dave Cranwell Date: Thu, 22 May 2014 17:38:43 +0100 Subject: [PATCH] added better examples --- docs/building_your_site/frontenddevelopers.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/building_your_site/frontenddevelopers.rst b/docs/building_your_site/frontenddevelopers.rst index 276c525ae..f86f09459 100644 --- a/docs/building_your_site/frontenddevelopers.rst +++ b/docs/building_your_site/frontenddevelopers.rst @@ -51,6 +51,13 @@ The syntax for displaying/manipulating an image is thus:: {% image [image] [method]-[dimension(s)] %} +For example:: + + {% image self.photo width-400 %} + + + {% image self.photo fill-80x80 %} + The ``image`` is the Django object refering to the image. If your page model defined a field called "photo" then ``image`` would probably be ``self.photo``. The ``method`` defines which resizing algorithm to use and ``dimension(s)`` provides height and/or width values (as ``[height]`` or ``[width]x[height]``) to refine that algorithm. Note that a space separates ``image`` and ``method``, but not ``method`` and ``dimensions``. A hyphen between ``width`` and ``dimensions`` is mandatory.