according to the documents of the form wizard, the source data must be a static dict. but you can dynamically provide raw data.
here is my situation
def get_context_data(self, form, **kwargs): context = super(debugRegistrationWizard, self).get_context_data(form=form, **kwargs) email = InvitationKey.objects.get_key_email(self.kwargs['invitation_key']) context.update({'invitation_key': self.kwargs['invitation_key']}) return context
the letter is what I want for the initial data in step 0, but I can only get this letter in the get_context_data method. How can i do this?
by the way, if urlconf for formwizard.as_view takes an argument like:
url(r'^registration/(?P<invitation_key>\w+)$', debugRegistrationWizard.as_view(FORMS)),
Dose means that I need to pass the variable to my form action attributes, because otherwise, when I submit the form, I will get an error of the found URL.
source share