Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Create A Template In Django

polls/templates/polls/index.html
{% if latest_question_list %}
    <ul>
    {% for question in latest_question_list %}
        <li><a href="/polls/{{ question.id }}/">{{ question.question_text }}</a></li>
    {% endfor %}
    </ul>
{% else %}
    <p>No polls are available.</p>
{% endif %}
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #Create #A #Template #In #Django
ADD COMMENT
Topic
Name
1+3 =