id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 4330,formtools.preview.FormPreview unused_name uses non-instance form,Daniel Blasco ,Adrian Holovaty,"Hi there, The FormPreview on the unused_name function uses self.form.fields from the form class, but form.fields isn't available on the Class but on the instance of a form so FormPreview raises an AttributeError when it's instances are called: {{{ Traceback (most recent call last): File ""/usr/lib/python2.4/site-packages/django/core/handlers/base.py"" in get_response 77. response = callback(request, *callback_args, **callback_kwargs) File ""/usr/lib/python2.4/site-packages/django/contrib/formtools/preview.py"" in __call__ 68. stage = {'1': 'preview', '2': 'post'}.get(request.POST.get(self.unused_name('stage')), 'preview') File ""/usr/lib/python2.4/site-packages/django/contrib/formtools/preview.py"" in unused_name 86. f = self.form.fields[name] AttributeError at /ab/add/post/ type object 'CuentaNewForm' has no attribute 'fields' }}} Maybe it should read form.base_fields from the class or instantiate a form to read .fields",,closed,contrib.formtools,dev,,fixed,,,Ready for checkin,1,0,0,0,0,0