Templates not working properly

已查看 18 次
跳至第一个未读帖子

Zaerion

未读,
2012年4月30日 16:41:252012/4/30
收件人 django...@googlegroups.com
I'm new to using Django and was working my way through the tutorial to get a better feel of it. I'm stuck on part 3 of the tutorial and the section where they show you how to use templates. When I hard-code the HttpResponse object everything works fine, but when I try to use a template it appears that none of the python code is being interpreted and it displays in the web browser. I am using Debian 6, Python 2.6, and Django 1.4 and things have been going smoothly up until this point. I'm sure I missed a setting somewhere or have something configured incorrectly, but I can't seem to find it. Any help is appreciated.
template01.png

Zaerion

未读,
2012年4月30日 17:05:592012/4/30
收件人 django...@googlegroups.com
Nevermind. I'm just an idiot. I had used parenthesis instead of curly braces. Sorry!

Gerald Klein

未读,
2012年4月30日 17:05:372012/4/30
收件人 django...@googlegroups.com
Hi, the delimiters use are using are wrong it should be {% not (%

On Mon, Apr 30, 2012 at 3:41 PM, Zaerion <zae...@gmail.com> wrote:
I'm new to using Django and was working my way through the tutorial to get a better feel of it. I'm stuck on part 3 of the tutorial and the section where they show you how to use templates. When I hard-code the HttpResponse object everything works fine, but when I try to use a template it appears that none of the python code is being interpreted and it displays in the web browser. I am using Debian 6, Python 2.6, and Django 1.4 and things have been going smoothly up until this point. I'm sure I missed a setting somewhere or have something configured incorrectly, but I can't seem to find it. Any help is appreciated.

--
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/-/IErgzK-V4BYJ.
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.



--

Gerald Klein DBA

Cont...@geraldklein.com

www.geraldklein.com

j...@zognet.com

708-599-0352


Linux registered user #548580 



Zaerion

未读,
2012年4月30日 17:07:502012/4/30
收件人 django...@googlegroups.com
Yup, I caught it just after I posted it and spent about 30 minutes trying to figure out what I did wrong. Thanks for the help! :)


On Monday, April 30, 2012 2:05:37 PM UTC-7, Gerald Klein wrote:
Hi, the delimiters use are using are wrong it should be {% not (%

On Mon, Apr 30, 2012 at 3:41 PM, Zaerion <zae...@gmail.com> wrote:
I'm new to using Django and was working my way through the tutorial to get a better feel of it. I'm stuck on part 3 of the tutorial and the section where they show you how to use templates. When I hard-code the HttpResponse object everything works fine, but when I try to use a template it appears that none of the python code is being interpreted and it displays in the web browser. I am using Debian 6, Python 2.6, and Django 1.4 and things have been going smoothly up until this point. I'm sure I missed a setting somewhere or have something configured incorrectly, but I can't seem to find it. Any help is appreciated.

--
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/-/IErgzK-V4BYJ.
To post to this group, send email to django...@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.

Gerald Klein

未读,
2012年4月30日 17:08:492012/4/30
收件人 django...@googlegroups.com
No problem eveyone has one of those moments

To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/XS7TMWWSqNYJ.

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.
回复全部
回复作者
转发
0 个新帖子