﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6357	'unicode' object has no attribute 'wkt'	sheats@…	jbronn	"
Using the GIS branch...

When you save an object in the admin that is spatially enabled the error ""'unicode' object has no attribute 'wkt'"" is thrown when there is a field validation error on another field.  For example, if you have a URLField and a MultipolygonField on a model and try to save an object with an invalid URL in the URLField you'll get the error.  Here are the details:

Template error:
In template /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/admin/templates/widget/default.html, error at line 1
   Caught an exception while rendering: 'unicode' object has no attribute 'wkt'
   1 : {% load admin_modify %} {% output_all bound_field.form_fields %} 


   2 : 

Traceback:
File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/template/debug.py"" in render_node
  71.             result = node.render(context)
File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/template/__init__.py"" in render
  852.                 return func(*resolved_vars)
File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/admin/templatetags/admin_modify.py"" in output_all
  184.     return u''.join([force_unicode(f) for f in form_fields])
File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/utils/encoding.py"" in force_unicode
  51.                 s = unicode(s)
File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/oldforms/__init__.py"" in __unicode__
  176.         return force_unicode(self.formfield.render(self.data))
File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/gis/oldforms/__init__.py"" in render
  12.             return super(WKTField, self).render(data.wkt)

Exception Type: AttributeError at /admin/schools/school/1257/
Exception Value: 'unicode' object has no attribute 'wkt'"		closed	GIS	gis		fixed	gis admin wkt	jbronn@…	Accepted	0	0	0	0	0	0
