Currently, attempting to set {{{self.instance}}} for the
{{{InlineFormSet}}} in the wizard's {{{get_form_instance}}} results in an
{{{AttributeError}}} saying "object has no attribute 'none'" as the wizard
attempts to set the form's queryset (instead of instance) with it's
{{{self.instance}}}.
I have a fix to propose here:
[https://github.com/flibbertigibbet/django/commit/885798aa250544bd5c6d3a7325dc5c20c0795f2c]
--
Ticket URL: <https://code.djangoproject.com/ticket/21259>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 1
* stage: Unreviewed => Accepted
Comment:
Tentatively accepting, however, a test case demonstrating the problem and
proving the fix works is necessary for this to be committed.
--
Ticket URL: <https://code.djangoproject.com/ticket/21259#comment:1>
Comment (by kkillebrew):
Okay, I've added a test to the pull request.
https://github.com/django/django/pull/1726
--
Ticket URL: <https://code.djangoproject.com/ticket/21259#comment:2>
* needs_better_patch: 0 => 1
* needs_tests: 1 => 0
Comment:
Thanks, I left comments for improve on the PR. Please uncheck "Patch needs
improvement" when you update it.
--
Ticket URL: <https://code.djangoproject.com/ticket/21259#comment:3>
Comment (by kkillebrew):
Thanks for the notes. I'm having some issues with the test models. I put
the new models.py in django.contrib.formtools.tests, and I see runtests.py
says in the verbose output 'Creating table formtools_testmodel', but then
the test fails with 'OperationalError: no such table: tests_poet'.
--
Ticket URL: <https://code.djangoproject.com/ticket/21259#comment:4>
Comment (by timo):
I believe you will need to include:
{{{
class Meta:
app_label = 'formtools'
}}}
on the model.
--
Ticket URL: <https://code.djangoproject.com/ticket/21259#comment:5>
* needs_better_patch: 1 => 0
Comment:
That worked! Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/21259#comment:6>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"7e5d7a76bf60564d39d25a101380e47da7f1e2f6"]:
{{{
#!CommitTicketReference repository=""
revision="7e5d7a76bf60564d39d25a101380e47da7f1e2f6"
Fixed #21259 -- Fixed formstools wizard for InlineFormSet.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21259#comment:7>