Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Build a Social Network with Flask Tacocat Challenge The Challenge

Anders Axelsen
Anders Axelsen
3,471 Points

I can register, login and create a taco. - But why is the taco not displayed in /index?

Hi there!

As you can see in the database from the snapshot, there is a sound creation of a taco. There is no display of it, though.

What am I missing?

Kindly, Anders

2 Answers

Hi Anders

You not outputting any of the tacos attributes hence your not getting any output.

{% extends 'layout.html' %}

{% block content %}
    {% if tacos.count() %}
        <table class="u-full-width">
        {% for taco in tacos %}
              <!-- taco attributes here -->
                <!-- your not outputting any attributes try the below -->
               <td>{{taco.protein}}</td> <!-- and so on -->

        {% endfor %}
    {% else %}
        <!-- message for missing tacos -->
        <p>no tacos yet</p>
    {% endif %}
{% endblock %}

hope that helps

Anders Axelsen
Anders Axelsen
3,471 Points

Hi Andreas.

Boy, this helps. :-)

It's such a great feeling, learning more and more. Thank you for helping!