What steps will reproduce the problem?
We have an application "guestbook". Now we have a small problem with rendering
forms. In the template file we have a code with this part
{{ form }}
this is equal to
{{ form.as_table }}
This command should render form in html table.
What is the expected output? What do you see instead?
ACTUAL RESULT. We have see correct form only on the first page loading. On all
next page reloads we have see error message (see traceback below).
EXPECTED RESULT. We should see rendered form without error messages.
Please use labels and text to provide additional information.
Traceback (most recent call last):
File "/home/anton/workspace/gaeframework/src/gae/webapp.py", line 104, in load_app
return app_action(self, **params)
File "/home/anton/workspace/gaeframework/src/apps/guestbook/controllers.py", line 22, in create_item
return app.render('guestbook/create_item', {'form': form})
File "/home/anton/workspace/gaeframework/src/gae/webapp.py", line 226, in render
return template.render(path, values, self.debug)
File "/home/anton/workspace/gaeframework/src/gae/template.py", line 17, in render
return t.render(Context(template_dict))
File "/home/anton/workspace/gaeframework/src/gae/template.py", line 65, in wrap_render
return orig_render(context)
File "gae/lib/django.zip/django/template/__init__.py", line 173, in render
File "gae/lib/django.zip/django/template/__init__.py", line 167, in _render
File "gae/lib/django.zip/django/template/__init__.py", line 796, in render
File "gae/lib/django.zip/django/template/debug.py", line 72, in render_node
File "gae/lib/django.zip/django/template/loader_tags.py", line 125, in render
File "gae/lib/django.zip/django/template/__init__.py", line 167, in _render
File "gae/lib/django.zip/django/template/__init__.py", line 796, in render
File "gae/lib/django.zip/django/template/debug.py", line 72, in render_node
File "gae/lib/django.zip/django/template/loader_tags.py", line 125, in render
File "gae/lib/django.zip/django/template/__init__.py", line 167, in _render
File "gae/lib/django.zip/django/template/__init__.py", line 796, in render
File "gae/lib/django.zip/django/template/debug.py", line 72, in render_node
File "gae/lib/django.zip/django/template/loader_tags.py", line 62, in render
File "gae/lib/django.zip/django/template/__init__.py", line 796, in render
File "gae/lib/django.zip/django/template/debug.py", line 72, in render_node
File "gae/lib/django.zip/django/template/loader_tags.py", line 62, in render
File "gae/lib/django.zip/django/template/__init__.py", line 796, in render
File "gae/lib/django.zip/django/template/debug.py", line 72, in render_node
File "gae/lib/django.zip/django/template/debug.py", line 91, in render
File "gae/lib/django.zip/django/utils/encoding.py", line 66, in force_unicode
File "gae/lib/django.zip/django/forms/forms.py", line 95, in __unicode__
File "gae/lib/django.zip/django/forms/forms.py", line 217, in as_table
File "gae/lib/django.zip/django/forms/forms.py", line 162, in _html_output
File "gae/lib/django.zip/django/utils/encoding.py", line 66, in force_unicode
TemplateSyntaxError: Caught TypeError while rendering: coercing to Unicode:
need string or buffer, instance found
Original issue reported on code.google.com by anton.danilchenko on 26 Jan 2011 at 8:46
Original issue reported on code.google.com by
anton.danilchenko
on 26 Jan 2011 at 8:46