Nevermind! I figured it out.

Just for reference for those with a similar problem:

"extends" and "include" aren't part of 'Template' and must be
separately included:


from django.template import Template, Context, loader
from django.http import HttpResponse

def render(request):
        admin_template = utility.getTemplate('templates/test.tpl')
        admin_context  = getModelContext();
        html = admin_template.render(admin_context);
        return HttpResponse(html)



On Apr 20, 6:42 pm, Renato Untalan <phis...@gmail.com> wrote:
> Hey guys, new to Django, and i'm having a little trouble just getting
> basic includes working.
>
> I have a basic template "world.html" as follows:
> <html>
> <body>
>   {% include 'hello.html' %}
>  World
> </body>
> </html>
>
> With "hello.html" as follows:
> Hello
>
> -----------------------------------------
>
> I'm getting the following error:
>
> TemplateSyntaxError at /test/
>
> Invalid block tag: 'include'
>
> Request Method:         GET
> Request URL:    http://localhost:8080/test/
> Exception Type:         TemplateSyntaxError
> Exception Value:
>
> Invalid block tag: 'include'
>
> Exception Location:     /usr/local/lib/python2.4/site-packages/django/
> template/__init__.py in invalid_block_tag, line 333
> Python Executable:      /usr/bin/python
> Python Version:         2.4.2
>
> ----------------------
>
> I'm pretty sure i'm running Django 1.0, so what would cause my
> %include tag not to function correctly?
> Thanks for the help!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to