Here's some interpreter session to give my upcoming
question a bit of context.
In [1]: from site.app.models import *
In [2]: manipulator = Container.AddManipulator()
In [3]: form = forms.FormWrapper(manipulator, {}, {})
In [4]: form['contained']
Out[4]: <django.forms.InlineObjectCollection object at
0xb76b4fcc>
In [5]: form['contained'].fill()
In [6]: form['contained']._collections
Out[6]:
{0: <FormFieldCollection: {'name': <FormFieldWrapper
for
"contained.0.name">, 'id':
<FormFieldWrapper for "contained.0.id">,
'amount': <FormFieldWrapper for
"contained.0.amount">, 'optional':
<FormFieldWrapper for
"contained.0.optional">, 'original': None,
'unit': <FormFieldWrapper for
"contained.0.unit">}>,
1: <FormFieldCollection: {'name': <FormFieldWrapper
for
"contained.1.name">, 'id':
<FormFieldWrapper for "contained.1.id">,
'amount': <FormFieldWrapper for
"contained.1.amount">, 'optional':
<FormFieldWrapper for
"contained.1.optional">, 'original': None,
'unit': <FormFieldWrapper for
"contained.1.unit">}>,
2: <FormFieldCollection: {'name': <FormFieldWrapper
for
"contained.2.name">, 'id':
<FormFieldWrapper for "contained.2.id">,
'amount': <FormFieldWrapper for
"contained.2.amount">, 'optional':
<FormFieldWrapper for
"contained.2.optional">, 'original': None,
'unit': <FormFieldWrapper for
"contained.2.unit">}>}
Does anyone know how to make an InlineObjectCollection have
more
inline objects when using AddManipulator and FormWrapper?
I'm only
getting three inline objects and I want to add more than
three
contained objects for every container object.
--~--~---------~--~----~------------~-------~--~----~
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-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|