We have recently upgraded django to 1.0.2 but this has subsequently
broken some inlineformsets we have. I'm not sure if this is a django
bug or if it is an error in our code, although the code pretty much
reflects that in the SVN documentation. Any help on this issue would
be much appreciated, in the meantime, I shall keep digging! Traceback
is as follows:

Traceback (most recent call last):

 File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py",
line 86, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/var/www/django/primus/contrib/statsandgoals/views.py", line
826, in add_cardio
   cardio_form = CardiovascularFormSet()

 File "/usr/lib/python2.4/site-packages/django/forms/models.py", line
468, in __init__
   queryset=qs)

 File "/usr/lib/python2.4/site-packages/django/forms/models.py", line
352, in __init__
   super(BaseModelFormSet, self).__init__(**defaults)

 File "/usr/lib/python2.4/site-packages/django/forms/formsets.py",
line 67, in __init__
   self._construct_forms()

 File "/usr/lib/python2.4/site-packages/django/forms/models.py", line
474, in _construct_forms
   super(BaseInlineFormSet, self)._construct_forms()

 File "/usr/lib/python2.4/site-packages/django/forms/formsets.py",
line 76, in _construct_forms
   self.forms.append(self._construct_form(i))

 File "/usr/lib/python2.4/site-packages/django/forms/models.py", line
477, in _construct_form
   form = super(BaseInlineFormSet, self)._construct_form(i, **kwargs)

 File "/usr/lib/python2.4/site-packages/django/forms/models.py", line
357, in _construct_form
   return super(BaseModelFormSet, self)._construct_form(i, **kwargs)

 File "/usr/lib/python2.4/site-packages/django/forms/formsets.py",
line 96, in _construct_form
   self.add_fields(form, i)

 File "/usr/lib/python2.4/site-packages/django/forms/models.py", line
494, in add_fields
   form.fields[self.fk.name] = InlineForeignKeyField(self.instance,
label=form.fields[self.fk.name].label)

KeyError: 'activity'

Cardiovascular object is an fk to Activity object.

Thanks again,

Pete
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to