Skip to content
This repository has been archived by the owner on Dec 23, 2018. It is now read-only.

How wrap a FormWizard in a View? #31

Open
BlindOSX opened this issue Dec 16, 2011 · 1 comment
Open

How wrap a FormWizard in a View? #31

BlindOSX opened this issue Dec 16, 2011 · 1 comment

Comments

@BlindOSX
Copy link

How do I wrap the new Django Form Wizard in a view? I need to do this so I can access request.

Does anyone have some example code for this?

@sigurdga
Copy link

@BlindOSX, you have probably found a solution to this. Here is mine, where I add the "missing" request variable to the form wizard myself:

    def get_context_data(self, form, **kwargs):
        context = super(MyWizard, self).get_context_data(form, **kwargs)
        context.update({'request': self.request})
        return context

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants