summaryrefslogtreecommitdiff
path: root/ishtar_common/wizards.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r--ishtar_common/wizards.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 002eeeb57..c8467ca61 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -32,7 +32,7 @@ from django.db.models.fields.files import FileField
from django.db.models.fields.related import ManyToManyField
from django.http import HttpResponseRedirect
from django.forms import ValidationError
-from django.shortcuts import render_to_response
+from django.shortcuts import render_to_response, redirect
from django.template import Context, RequestContext, loader
from django.utils.datastructures import MultiValueDict as BaseMultiValueDict
from django.utils.translation import ugettext_lazy as _
@@ -653,7 +653,7 @@ class Wizard(NamedUrlWizardView):
return (to_delete, not_to_delete)
def get_form(self, step=None, data=None, files=None):
- """Manage formset"""
+ # Manage formset
if data:
data = data.copy()
if not step:
@@ -716,6 +716,7 @@ class Wizard(NamedUrlWizardView):
# for k in init[0]:
# data[step + '-' + unicode(total_field) + '-' + k] = \
# init[0][k]
+
data = data or None
form = super(Wizard, self).get_form(step, data, files)
# add autofocus to first field
@@ -744,6 +745,7 @@ class Wizard(NamedUrlWizardView):
if frm.fields[key].widget.source_full is not None:
frm.fields[key].widget.source_full = unicode(
frm.fields[key].widget.source_full) + "own/"
+
return form
def render_next_step(self, form, **kwargs):
@@ -781,10 +783,7 @@ class Wizard(NamedUrlWizardView):
except (ValueError, IndexError):
return super(Wizard, self).post(*args, **kwargs)
self.storage.current_step = wizard_goto_step
- form = self.get_form(
- data=self.storage.get_step_data(self.steps.current),
- files=self.storage.get_step_files(self.steps.current))
- return self.render(form)
+ return redirect(self.get_step_url(wizard_goto_step))
def session_get_keys(self, form_key):
"""Get list of available keys for a specific form