Hello everyone :)

I want to display some datas on a <TD> wtih Django Template. I have menus 
(for eat in reaturant) But I can't display the menuItems in the <TD> But it 
displays other parts of the table.

Here is my stackoverflow topic if you want more details (model for example) 
: 
http://stackoverflow.com/questions/37684960/django-template-display-model-data?noredirect=1#comment62866889_37684960

Thank you a lot if you can help me on my problem :) 

<h3>{% trans "My menus" %}</h3>
  <div class="table-responsive">
      <table class="table table-striped table-hover">
          <tr>
              <th>{% trans "Name" %}</th>
              <th>{% trans "Detail" %}</th>
              <th>{% trans "Action" %}</th>
          </tr>
      {% for menu in menus %}
        <tr>
            <td>
              {{menu.title}} - {{menu.validDate|date:"d.m.Y"}}
                  {% if menu.midi and menu.soir %}
                      - Midi & Soir
                  {% elif menu.midi %}
                      - Midi
                  {% elif menu.soir %}
                      - Soir
                  {% endif %}
            </td>
            <td>
                        {% for paragraph in menuParagraph %}
                <td>&nbsp;&nbsp;&nbsp;<I>{{paragraph.text}}</I></td>
                {% for menuItem in menuItems %}
                    {% if menuItem.paragraph.text == paragraph.text %}
                        <td>
                            <a 
href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{menuItem.descrShort}} 
({{menuItem.menuItemId.name}})</a>
                        </td>
                    {% endif %}
                {% endfor %}
            {% endfor %} -->
              {% for menuitem in menuitems %}
                {{menuitem.descrShort}} ({{menuItem.menuItemId.name}})
              {% endfor %}
            </td>
            <td>
                <a class="edit-link" 
href="/b2b/partner/menu/modify/{{partnerId}}/{{menu.id}}/"><span 
class="glyphicon  glyphicon-pencil" aria-hidden="true" data-toggle="tooltip" 
data-placement="top" title="{% trans "Edit" %}"></span></a>&nbsp;|&nbsp;<a 
href="/b2b/partner/menu/delete/{{partnerId}}/{{menu.id}}/" onclick="return 
confirm('{% trans "Are you sure?" %}')"><span class="glyphicon  
glyphicon-trash" aria-hidden="true" data-toggle="tooltip" data-placement="top" 
title="{% trans "Delete" %}"></span></a>
            </td>
        </tr>
        {% endfor %}
  </table>



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f14f07bf-2a5d-4d14-a0e7-b048aafbefb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to