Django + Bootstrap error (django.template.exception.templateSyntaxError: Unknown argument for 'include' tag: 'width="100%")

Asked 2 years ago, Updated 2 years ago, 83 views

In one of the bootstrap examples, we implemented the album example in django, and when you run the runserver command in managy.py, the message django.template.exception.TemplateError: Unknown argument for 'include: 100%' appears. {%include icons/placeholder.svgwidth="100%" height="225" background="#55595c" color="#eeef" class="card-img-top" text="Thumbnail" %} Why does this error appear...

https://github.com/Lumieres-4095/Lumieres_io

This is the project repository. I'm new to web development. Thank you ㅠ<

django python bootstrap

2022-09-20 20:08

1 Answers

Can the template engine deliver parameters when including these days? {% Please fill in include icons/placeholder.svg} only.

Check the grammar of the Template Engine in this part.

If you haven't touched anything, I think you're using the Django Default Template engine.

https://docs.djangoproject.com/en/3.1/ref/templates/builtins/#include Here's the grammar, and there's no grammar to do that. Why did you write it like that?


2022-09-20 20:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.