Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 8 (Page 345) #65

Open
mbvgua opened this issue Aug 30, 2024 · 0 comments
Open

Chapter 8 (Page 345) #65

mbvgua opened this issue Aug 30, 2024 · 0 comments

Comments

@mbvgua
Copy link

mbvgua commented Aug 30, 2024

the code sample for displaying images to the page is written like so on the book
Screenshot from 2024-08-30 13-56-53

In the image tag, the use of quoation marks in the jinja template that are already within the already existing quotation marks gives the impression of them closing, and as such the image will not be loaded. To fix this issue, one should instaed use single quation marks within the jinja template and double quoatations outside of it, as shown below:

    <img src="{% if product.image %} {{ product.image.url }} {% else %} {%static 'img/no_image.png' %} {% endif %}">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant