I am currently doing the tutorial and I'm writing views.
I wrote my index.html file and updated the view to use a loader and add the
extra code that they provided. It tells me next to load
127.0.0.1:8000/polls and I should see a bulleted list containing the "whats
up" question but my page is bl
I am currently up to the "writing views" part of the tutorial and just
wrote the polls/index.html template. I updated the view in polls/view.py as
such:
from django.http import HttpResponse
from django.template import loader
from .models import Question
def index(request):
latest_question_
*Here is my template.*
> *index.html*
>>
>
{% if latest_question_list %}
{% for question in latest_question %}
{{question.question_text}}
{% endfor %}
{% else %}
No polls are available.
{% endif %}
*Here is my command prompt log.*
Microsoft Windows [Version 10.0
>
> *I've found my mistake with the index.html file.*
>
{% for question in latest_question %}
{{question.question_text}}
herf is suppose to be href.
But http://127.0.0.1:8000/ still says page not found.
--
You received this message because you are subscribed to the Google Groups
4 matches
Mail list logo