I have a template in where I load a set of questions for a a questionnaire, and each question has a set of options all this information is retrieved from a database. so there's one for to questions and another for to options, that gives:
{% for question in questionnaire %} <tr><td colspan="3"><b>{{forloop.counter}}. {{ question }}</b></ td></tr> <tr> {% for alternative in question.get_alternatives %} <td><input type="radio" name="{{question.id}}" value="{{alternative.id}}"> {{ alternative }}</radio> {% endfor %} </tr> {% endfor %} The problem: depending on the number of questions, it can get pretty heavy and time-consuming to retrieve all questionnaire from the database. My raw solution was to copy the output html code of all questionnaires and save it on another "static" template, I'm aware of the non-practicality of such so, here's my question: Is there any pythonic-djangonic way to, in a lazy-loading style, generate a template file where all the database retrieving was already done and the whole html code was made, only regenerating this file if something was changed in the database? Did I made this question understandable? (I'm sorry, I'm a noob) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.