Check this one : https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATE_CONTEXT_PROCESSORS
2012/11/25 Luisa Beck <emmi.b...@gmail.com>: > Also, I get the following error message when rendering the page with my > local server: > > TemplateSyntaxError at /polls/ > > Could not parse the remainder: '<a href="http://poll.id/">poll.id</a>' from > '<a href="http://poll.id/">poll.id</a>' > > > On Sunday, November 25, 2012 8:34:26 AM UTC-5, Luisa Beck wrote: >> >> Mm, I don't have a TEMPLATE_CONTEXT_PROCESSORS section in the setting.py >> section. >> The setting.py file in my version of Django only includes TEMPLATE_DEBUG, >> TEMPLATE_LOADERS and TEMPLATE_DIRS. >> >> Could you specify what you mean? Thank you. >> >> On Sunday, November 25, 2012 8:16:00 AM UTC-5, Sergiy Khohlov wrote: >>> >>> looks like you have a problem with template processor >>> could you please check setting.py section TEMPLATE_CONTEXT_PROCESSORS >>> >>> 2012/11/25 Luisa Beck <emmi...@gmail.com>: >>> > Thank you Xavier and Sergiy for your responses. >>> > >>> > To clarify: I put the following code (see below) into my index.html >>> > file and >>> > got a page displaying the code (rather than a list) when I rendered it >>> > in my >>> > browser by my local server: >>> > >>> > Could the problem have to do with my file system? I created a directory >>> > called 'templates' in the inner 'mysites' folder and created another >>> > directory within that called 'polls'. That's where I put the index.html >>> > file. And I also edited TEMPLATE_DIRS in my settings.py to tell Django >>> > the >>> > absolute path to index.html. >>> > >>> > Any more thoughts about this? Thank you! >>> > >>> > >>> > <html> >>> > >>> > <head><title>Test</title></head> >>> > >>> > >>> > <body> >>> > >>> > {% 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 %} >>> > >>> > >>> > </body> >>> > >>> > </html> >>> > >>> > >>> > >>> > >>> > On Saturday, November 24, 2012 5:48:29 PM UTC-5, Sergiy Khohlov wrote: >>> >> >>> >> 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...@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...@googlegroups.com. >>> >> > To unsubscribe from this group, send email to >>> >> > django-users...@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 view this discussion on the web visit >>> > https://groups.google.com/d/msg/django-users/-/vZnRe-IPpLEJ. >>> > >>> > To post to this group, send email to django...@googlegroups.com. >>> > To unsubscribe from this group, send email to >>> > django-users...@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 view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/-0o7jEx-H-4J. > > To post to this group, send email to django-users@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. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.