Pārlūkot izejas kodu

Fix code example for {% picture ... as ... %} tag - fixes #11186

Matt Westcott 1 gadu atpakaļ
vecāks
revīzija
9fe2e6a419
3 mainītis faili ar 8 papildinājumiem un 3 dzēšanām
  1. 2 1
      CHANGELOG.txt
  2. 4 0
      docs/releases/5.2.1.md
  3. 2 2
      docs/topics/images.md

+ 2 - 1
CHANGELOG.txt

@@ -22,7 +22,8 @@ Changelog
 5.2.1 (xx.xx.xxxx) - IN DEVELOPMENT
 ~~~~~~~~~~~~~~~~~~
 
-* Fix: Add a fallback background for the editing preview iframe for sites without a background (Ian Price)
+ * Fix: Add a fallback background for the editing preview iframe for sites without a background (Ian Price)
+ * Docs: Fix code example for `{% picture ... as ... %}` template tag (Rezyapkin)
 
 
 5.2 LTS (01.11.2023)

+ 4 - 0
docs/releases/5.2.1.md

@@ -15,3 +15,7 @@ depth: 1
 ### Bug fixes
 
  * Add a fallback background for the editing preview iframe for sites without a background (Ian Price)
+
+### Documentation
+
+ * Fix code example for `{% picture ... as ... %}` template tag (Rezyapkin)

+ 2 - 2
docs/topics/images.md

@@ -274,8 +274,8 @@ And with the picture tag, to retrieve multiple formats:
 ```html+django
 {% picture page.photo format-{avif,jpeg} as tmp_photo %}
 
-{{ tmp_photo.avif.0.url }}
-{{ tmp_photo.jpeg.0.url }}
+{{ tmp_photo.formats.avif.0.url }}
+{{ tmp_photo.formats.jpeg.0.url }}
 ```
 
 ```{note}