Re: Tutorial writing views help

2017-08-14 Thread Sol Chikuse
Hi Kareem, In your template you have your code as: {% for question in latest_question %} According to your context dictionary in your index view, the above template code should be: {% for question in latest_question_list %} And then you should go to the url 127.0.0.1:8000/polls/ Regards.

RE: Tutorial writing views help

2017-08-14 Thread Matthew Pava
Subject: Re: Tutorial writing views help I've found my mistake with the index.html file. {% for question in latest_question %} http://question.id/>}}/">{{question.question_text}} herf is suppose to be href. But http://127.0.0.1:8000/ still says page not found. -- Y

Re: Tutorial writing views help

2017-08-14 Thread Kareem Hart
> > *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

Re: Tutorial writing views help

2017-08-14 Thread Kareem Hart
*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

Re: Tutorial writing views help

2017-08-14 Thread Sol Chikuse
Hi Kareem, Regarding the 404 page error, you do not have to put a dot (.) at the end of your URL. Django does not have such kind of a pattern match in your urls. *127.0.0.1:8000/polls/ *is the correct URL. Having said that, how does your index template look like?

Tutorial writing views help

2017-08-11 Thread Kareem Hart
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_