[ACTION]

Subclass NamedUrlSessionWizardView and instantiate it with a set of
forms one of them containing a FileField

class CommonWizardView(NamedUrlSessionWizardView):
    pass

class FamilyWizardView(CommonWizardView):
    pass

[RESULT]

File "/accounts/urls.py", line 66, in <module>

family_wizard = FamilyWizardView.as_view(named_family_forms,
url_name='family_step', done_step_name='family_wizard')

File "python2.7/site-packages/django_formwizard-1.0-py2.7.egg/
formwizard/views.py", line 109, in as_view

initkwargs = cls.get_initkwargs(*args, **kwargs)

File "python2.7/site-packages/django_formwizard-1.0-py2.7.egg/
formwizard/views.py", line 583, in get_initkwargs

initkwargs = super(NamedUrlWizardView, cls).get_initkwargs(*args,
**kwargs)

File "python2.7/site-packages/django_formwizard-1.0-py2.7.egg/
formwizard/views.py", line 166, in get_initkwargs

raise NoFileStorageConfigured


TemplateSyntaxError: Caught NoFileStorageConfigured while rendering

[CAUSE]

class WizardView(TemplateView):
    @classmethod
    def get_initkwargs(cls, form_list, initial_dict=None,
            instance_dict=None, condition_dict=None, *args, **kwargs):
        """
        Creates a dict with all needed parameters for the form wizard
instances.
        """
        ....
            # check if any form contains a FileField, if yes, we need
a
            # file_storage added to the wizardview (by subclassing).
            for field in form.base_fields.itervalues():
                if (isinstance(field, forms.FileField) and
                        not hasattr(cls, 'file_storage')):
                    raise NoFileStorageConfigured

[RESOLUTION]

subclassing is not enough.  I inherited from both
NamedUrlSessionWizardView and FileSystemStorage, as shown below, but I
keep getting this error.

class FamilyWizardView(CommonWizardView, FileSystemStorage):
    pass

I noticed an instance variable in formwizard called storage_name but
it is used for child clasess Session and Cookie WizardViews. Si it's
no relevant

please, could you shed some light  ?

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

Reply via email to