Saturday, November 24, 2012

Re: Tutorial Part 3: loading index.html in browser

Near too.

simple example of your fitst template:
http://www.djangobook.com/en/2.0/chapter04.html

remove all after <body> to </body> and place your code inside this....

2012/11/25 Luisa Beck <emmi.beck@gmail.com>:
> I'm in the process of going through the Django tutorials.
> I'm having trouble with loading the index.html file into the browser. I
> don't see a bulleted-list containing the "What's up" poll from Tutorial 1.
> Instead, I'm simply seeing the code that I pasted from green box (see middle
> of the page in the tutorial- I've also pasted it below).
> The tutorial says "put the following code in that template". Does it mean
> that the code is supposed to go into the index.html file that I created?
>
> Thanks!
>
> {% if latest_poll_list %}
> <ul>
> {% for poll in latest_poll_list %}
> <li><a href="/polls/{{ poll.id }}/">{{ poll.question }}</a></li>
> {% endfor %}
> </ul>
> {% else %}
> <p>No polls are available.</p>
> {% endif %}
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/xwta_28JByIJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment