On 8/17/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> I suspect the problem is in how you're loading the template and
> rendering it. Can you paste us the code in your view that loads the
> template, passes it a context and renders it? If you're not sure what
> code I'm talking about, just paste us your whole view, if that's
> possible.

I'm reproing here.

index.html:
====
{% extends "basex.html" %}

{% block content %}
hi

{% endblock %}
====
basex.html (just to ensure not picking up from somewhere surprising)
===
{% block content %} {% endblock %}
===

C:\temp\priv\djangotest>python manage.py shell
Python 2.4.1 (#65, Jun 20 2005, 17:01:55) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import settings
>>> settings.TEMPLATE_LOADERS
('django.template.loaders.filesystem.load_template_source', 'django.template.loa
ders.app_directories.load_template_source')
>>> settings.TEMPLATE_DIRS
('C:/temp/priv/djangotest/test/templates',)
>>> from django.template import loader
>>> ind  = loader.get_template('index.html')
>>> ind.render({})
Traceback (most recent call last):
  File "<console>", line 1, in ?
  File "c:\temp\priv\django\django\template\__init__.py", line 155, in render
    return self.nodelist.render(context)
  File "c:\temp\priv\django\django\template\__init__.py", line 688, in render
    bits.append(self.render_node(node, context))
  File "c:\temp\priv\django\django\template\__init__.py", line 706, in render_no
de
    result = node.render(context)
  File "c:\temp\priv\django\django\template\loader_tags.py", line 82, in render
    return compiled_parent.render(context)
  File "c:\temp\priv\django\django\template\__init__.py", line 155, in render
    return self.nodelist.render(context)
  File "c:\temp\priv\django\django\template\__init__.py", line 688, in render
    bits.append(self.render_node(node, context))
  File "c:\temp\priv\django\django\template\__init__.py", line 716, in render_no
de
    raise wrapped
TemplateSyntaxError: Caught an exception while rendering: 'dict' object has no a
ttribute 'push'

Original Traceback (most recent call last):
  File "c:\temp\priv\django\django\template\__init__.py", line 706, in render_no
de
    result = node.render(context)
  File "c:\temp\priv\django\django\template\loader_tags.py", line 19, in render
    context.push()
AttributeError: 'dict' object has no attribute 'push'

>>>
====
..I'm at a loss.

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to