I would like to use the @permission_required decorator with the "form
wizard" to authenticate my users.  Since views are not used with the
wizard, how can I authenticate with it?  I saw examples of wrappers
used for generic views, but cannot figure how to do this with the
wizard.

Would you do something like this:

urls.py
-------
urlpatterns = patterns('main_site.vlis.production.order.views',
    #(r'^add/$', AddOrderWizard([OrderForm1, OrderForm2Quote,
OrderForm3])),  # old code...
    (r'^add/$', 'wrapper_for_wizard'),  #new code
)

views.py
----------
@permission_required('order.add_order')
def wrapper_for_wizard(request):
    return AddOrderWizard([OrderForm1, OrderForm2Quote, OrderForm3])

I tried this and received an error so I'm not doing something right.
Is there a way to do this?  Any help would be much appreciated.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to