| Issue 415: | djangoforms renders StringListProperty incorrectly | |
| 11 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
What steps will reproduce the problem?
Model:
class Test(db.Model):
items = db.StringListProperty()
View:
def test(request):
class TestForm(djangoforms.ModelForm):
class Meta:
model = Test
form = TestForm()
return render_to_response('test.html', {'form':form})
What is the expected output? What do you see instead?
According to appengine.ext.db.djangoforms ListProperties are supposed to
rendered in a Textarea, with one value on each line.
However in my Test a Inputfield ist rendered with a value of "[]".
Changing this value to that "['test']" results in a value of
"[,',t,e,s,t,',]" in the data store.
What version of the product are you using? On what operating system?
vista, 1.1.0
|
||||||||||
,
Jul 11, 2008
Here's a workaround:
in ext.db.__init__, StringListProperty function (line 2144), remove it and replace with:
class StringListProperty(ListProperty):
def __init__(self, verbose_name=None, default=None, **kwds):
return super(StringListProperty, self).__init__(basestring, verbose_name,
default, **kwds)
|
|||||||||||
,
Aug 19, 2008
(No comment was entered for this change.)
Status: Accepted
Owner: ma...@google.com |
|||||||||||
,
Oct 03, 2008
(No comment was entered for this change.)
Status: Fixed
|
|||||||||||
|
|
|||||||||||