I feel like I missed something in this exchange. The template setup looked as 
though it was designed to loop though a list of dictionaries. As a result, 
based on the code provided, it should have produced two rows of data? Was that 
not the case?

Benny

On May 15, 2021, at 5:25 PM, Walter Randazzo <wwranda...@gmail.com> wrote:


Yes Boris. It works fine now.

Thanks,

El sáb, 15 may 2021 a las 19:18, Boris Pérez 
(<polu...@gmail.com<mailto:polu...@gmail.com>>) escribió:
Hi Walter, your template is rendering the data ok, after the changes???


2021-05-14 20:56 GMT-04:00, Walter Randazzo 
<wwranda...@gmail.com<mailto:wwranda...@gmail.com>>:
> Hi All,
>
> This is how I get this working..... (Thanks to Boris for the suggestion)
> I have modified a the structure of the data from list of dictionaries to a
> dictionary.
>
> *#Now This is how the dictionary is printed in console*
>
> {'25': {'socio': 'Randazzo Walter Ariel 25', 'enero': 'P', 'febrero': 'P',
> 'marzo': 'P', 'abril': 'P', 'mayo': 'P', 'junio': 'P', 'julio': 'P',
> 'agosto': 'P', 'septiembre': 'P', 'octubre': 'P', 'noviembre': 'P',
> 'diciembre': 'P'}, '31': {'socio': 'Silvi Edgardo Marcelo 31', 'enero':
> 'P', 'febrero': 'P', 'marzo': 'P', 'abril': 'P', 'mayo': 'P', 'junio': 'P',
> 'julio': '-', 'agosto': '-', 'septiembre': '-', 'octubre': '-',
> 'noviembre': '-', 'diciembre': '-'}}
>
> *#This is how I populate the dictionary:*
>
>             dictinfopagosanual[nrosocio]={'socio':soc,
>                                        'enero':EneroPago,
>                                        'febrero':FebreroPago,
>                                        'marzo':MarzoPago,
>                                        'abril':AbrilPago,
>                                        'mayo':MayoPago,
>                                        'junio':JunioPago,
>                                        'julio':JulioPago,
>                                        'agosto':AgostoPago,
>                                        'septiembre':SeptiembrePago,
>                                        'octubre':OctubrePago,
>                                        'noviembre':NoviembrePago,
>                                        'diciembre':DiciembrePago,
>         }
>
> *#Then I render in the template as follow:*
>
>         <tbody>
>     {% for key,value in pagos.items %}
>         <tr {% if forloop.first %}style="padding-top: 3px;" {% endif %}>
>         {% for key,value in value.items %}
>            <td class="text-center">{{ value }}</td>
>         {% endfor %}
>         </tr>
>     {% endfor %}
>     </tbody>
>
>
>
>
> El vie, 14 may 2021 a las 19:59, Walter Randazzo 
> (<wwranda...@gmail.com<mailto:wwranda...@gmail.com>>)
> escribió:
>
>> Hi Boris,
>>
>> You're right it is a list of dictionaries. I thought that the template is
>> not able to render the data structure I used.
>>
>> I will take a look on the link,thanks for  the advice.
>>
>> Gracias Boris,
>>
>>
>>
>> El vie, 14 may 2021 a las 17:18, Boris Pérez 
>> (<polu...@gmail.com<mailto:polu...@gmail.com>>)
>> escribió:
>>
>>> Hi Walter, i think the matter is  that your dictionary, is not a
>>> dictionary,  is a list of dictionaries (it looks more than json
>>> object) perhaps u wanna use jquery and ajax, into your template...
>>> Maybe this link is usefull to u
>>>
>>> https://stackoverflow.com/questions/51209582/django-dictionary-to-html-table-when-values-are-generators.
>>> ..
>>> Greetings, Boris
>>>
>>>
>>> 2021-05-14 12:44 GMT-04:00, Walter Randazzo 
>>> <wwranda...@gmail.com<mailto:wwranda...@gmail.com>>:
>>> > Hi Boris, Thanks for the reply.
>>> >
>>> > Here is the code:
>>> >
>>> > View:
>>> > http://del.dog/mavihosuna
>>> >
>>> > Template:
>>> > https://del.dog/mirfanelor
>>> >
>>> > Image of the rendered Template:
>>> > https://tmpsee.com/v/nbkdqhnxee
>>> >
>>> >
>>> > Regards,
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > El vie, 14 may 2021 a las 11:57, Boris Pérez 
>>> > (<polu...@gmail.com<mailto:polu...@gmail.com>>)
>>> > escribió:
>>> >
>>> >> Where is the code, that u are using...
>>> >> Si quieres igual hablamos en español...
>>> >> Saludos...
>>> >>
>>> >> 2021-05-13 22:03 GMT-04:00, Walter Randazzo 
>>> >> <wwranda...@gmail.com<mailto:wwranda...@gmail.com>>:
>>> >> > Hi Gabriel,
>>> >> >
>>> >> > I´ve just share the code via snippet to respect the identation of
>>> >> > the
>>> >> code
>>> >> >
>>> >> >
>>> >> > El jue, 13 may 2021 a las 21:47, Gabriel Araya Garcia (<
>>> >> > gabrielaraya2...@gmail.com<mailto:gabrielaraya2...@gmail.com>>) 
>>> >> > escribió:
>>> >> >
>>> >> >> The links (image, code, and   https://tmpsee.com/v/nbkdqhnxee)
>>> >> >> they
>>> >> >> are
>>> >> >> shit. It is impossible see it. Why you don't cut and paste here in
>>> >> >> forum
>>> >> >> page ?
>>> >> >> Gabriel Araya Garcia
>>> >> >> GMI - Desarrollo de Sistemas Informáticos
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> El jue, 13 may 2021 a las 20:22, Walter Randazzo
>>> >> >> (<wwranda...@gmail.com<mailto:wwranda...@gmail.com>
>>> >> >)
>>> >> >> escribió:
>>> >> >>
>>> >> >>> Here is how the dictionary is render out in the template:
>>> >> >>> https://tmpsee.com/v/nbkdqhnxee
>>> >> >>>
>>> >> >>> thanks
>>> >> >>>
>>> >> >>> --
>>> >> >>> 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 
>>> >> >>> django-users+unsubscr...@googlegroups.com<mailto:django-users%2bunsubscr...@googlegroups.com>.
>>> >> >>> To view this discussion on the web visit
>>> >> >>>
>>> >>
>>> https://groups.google.com/d/msgid/django-users/CAL7Dry7q1_WumJy1kKJROVD7xYFZ-2ie43LQMHJt0dLRQ9Lv0w%40mail.gmail.com
>>> >> >>> <
>>> >>
>>> https://groups.google.com/d/msgid/django-users/CAL7Dry7q1_WumJy1kKJROVD7xYFZ-2ie43LQMHJt0dLRQ9Lv0w%40mail.gmail.com?utm_medium=email&utm_source=footer
>>> >> >
>>> >> >>> .
>>> >> >>>
>>> >> >> --
>>> >> >> 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 
>>> >> >> django-users+unsubscr...@googlegroups.com<mailto:django-users%2bunsubscr...@googlegroups.com>.
>>> >> >> To view this discussion on the web visit
>>> >> >>
>>> >>
>>> https://groups.google.com/d/msgid/django-users/CAKVvSDDqOqnGXWZcE8wZ6V%2B-Dzy1zCudBhpR406-5sJieRaefg%40mail.gmail.com
>>> >> >> <
>>> >>
>>> https://groups.google.com/d/msgid/django-users/CAKVvSDDqOqnGXWZcE8wZ6V%2B-Dzy1zCudBhpR406-5sJieRaefg%40mail.gmail.com?utm_medium=email&utm_source=footer
>>> >> >
>>> >> >> .
>>> >> >>
>>> >> >
>>> >> > --
>>> >> > 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 
>>> >> > django-users+unsubscr...@googlegroups.com<mailto:django-users%2bunsubscr...@googlegroups.com>.
>>> >> > To view this discussion on the web visit
>>> >> >
>>> >>
>>> https://groups.google.com/d/msgid/django-users/CAL7Dry6v_yLMrAH8rGTmwYa8FQNgVtWmU8Rq56FF7bqCfuuPTg%40mail.gmail.com
>>> >> .
>>> >> >
>>> >>
>>> >> --
>>> >> 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 
>>> >> django-users+unsubscr...@googlegroups.com<mailto:django-users%2bunsubscr...@googlegroups.com>.
>>> >> To view this discussion on the web visit
>>> >>
>>> https://groups.google.com/d/msgid/django-users/CAObPVPCx_FJrD96d0vSWMt4V4eDAQ2ZA1%3D9vKm42Q-iqhG6f_g%40mail.gmail.com
>>> >> .
>>> >>
>>> >
>>> > --
>>> > 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 
>>> > django-users+unsubscr...@googlegroups.com<mailto:django-users%2bunsubscr...@googlegroups.com>.
>>> > To view this discussion on the web visit
>>> >
>>> https://groups.google.com/d/msgid/django-users/CAL7Dry56TTF8%2BN7KB0-bPgdV6bn7RZLvGje9x-6rHjFmgY1RDg%40mail.gmail.com
>>> .
>>> >
>>>
>>> --
>>> 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 
>>> django-users+unsubscr...@googlegroups.com<mailto:django-users%2bunsubscr...@googlegroups.com>.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAObPVPBSTCCT7M95QzC9hMARE7Fzd0gkkGtJCjQryDJChHyCKA%40mail.gmail.com
>>> .
>>>
>>
>
> --
> 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 
> django-users+unsubscr...@googlegroups.com<mailto:django-users%2bunsubscr...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAL7Dry6w2FfdOtT%2BG0VmnzuzXMm9eGS5dtS-MPdF4ddbPrnJ_Q%40mail.gmail.com.
>

--
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 
django-users+unsubscr...@googlegroups.com<mailto:django-users%2bunsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAObPVPDE2pg%3DgJd%3DCCkA2%2Ba-HEM44zJgOziHZVNxw8T98xYiFw%40mail.gmail.com.

--
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 
django-users+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAL7Dry78v1xX%3DkS-vokPsTqSsjM3xzhz7Rc%2BO%2BZbpFEtngzymA%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CAL7Dry78v1xX%3DkS-vokPsTqSsjM3xzhz7Rc%2BO%2BZbpFEtngzymA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CH2PR14MB3913A9D46A47FA7A4484E1F3C02F9%40CH2PR14MB3913.namprd14.prod.outlook.com.

Reply via email to