views:

30

answers:

2

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

Does anyone have some example code for this?

A: 

This Django snippet may prove useful.

From the title: "FormWizard inside view with proper context handling and site templating support, without having to use urls.py"

Manoj Govindan
Well, im lost with "without having to use urls.py"
Asinox
A: 

I probably should be just commenting on Manoj's answer, but sounds you need code

urls.py

from django.conf.urls.defaults import *
from MyApp import views

urlpatterns = patterns(
  '',
  (r'^wizard/$', views.MyWizardView ),
)

views.py

@login_required    
def MyWizardView (request):
  cw = MyWizard([WizardName, WizardQuestions, WizardProvider, WizardGoomber])
  return cw(request)
BozoJoe