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

Some wrong with canvas tags in the index.html weather part when I use for loop in django #915

Open
jiufenfan opened this issue Nov 17, 2020 · 0 comments

Comments

@jiufenfan
Copy link

I am trying to rewrite the index.html with Django to construct my website . However When applying {%for %} to ,only two of the weather images showed in the page(should be five ).Here is my code in image:
image

{% for forecast in forecasts %}
              <div class="col-sm-2">
                <div class="daily-weather">
                  <h2 class="day">{{forecast|get_item:'date'}}</h2>
                  <h3 class="degrees">{{forecast|get_item:'high'}}</h3>
                  <canvas id="{{forecast|get_item:'type'}}" width="32" height="32"></canvas>
                  <h5>{{forecast|get_item:'fengxiang'}}</h5>
                </div>
              </div>
             {% endfor %}
             
              <div class="clearfix"></div>
            </div> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant