Update screenshots for our tutorial
Przed Szerokość: | Wysokość: | Rozmiar: 171 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 116 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 141 KiB Po Szerokość: | Wysokość: | Rozmiar: 18 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 83 KiB Po Szerokość: | Wysokość: | Rozmiar: 4.3 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 45 KiB Po Szerokość: | Wysokość: | Rozmiar: 26 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 48 KiB Po Szerokość: | Wysokość: | Rozmiar: 17 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 204 KiB Po Szerokość: | Wysokość: | Rozmiar: 41 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 188 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 114 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 260 KiB Po Szerokość: | Wysokość: | Rozmiar: 61 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 72 KiB Po Szerokość: | Wysokość: | Rozmiar: 26 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 91 KiB Po Szerokość: | Wysokość: | Rozmiar: 8.5 KiB |
|
@ -547,7 +547,7 @@ Adjust your blog page template to include the images:
|
|||
|
||||
Here we use the `{% image %}` tag (which exists in the `wagtailimages_tags` library, imported at the top of the template) to insert an `<img>` element, with a `fill-320x240` parameter to indicate that the image should be resized and cropped to fill a 320x240 rectangle. You can read more about using images in templates in the [docs](../topics/images).
|
||||
|
||||

|
||||

|
||||
|
||||
Since our gallery images are database objects in their own right, we can now query and re-use them independently of the blog post body. Let's define a `main_image` method, which returns the image from the first gallery item (or `None` if no gallery items exist):
|
||||
|
||||
|
@ -848,7 +848,7 @@ Finally, we can update the `blog_page.html` template to display the categories:
|
|||
{% endwith %}
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
## Where next
|
||||
|
||||
|
|