summaryrefslogtreecommitdiff
path: root/ishtar/furnitures/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar/furnitures/forms.py')
-rw-r--r--ishtar/furnitures/forms.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/ishtar/furnitures/forms.py b/ishtar/furnitures/forms.py
index 589ae1d88..4c3efa33a 100644
--- a/ishtar/furnitures/forms.py
+++ b/ishtar/furnitures/forms.py
@@ -21,5 +21,27 @@
Forms definition
"""
from django.utils.translation import ugettext_lazy as _
+from wizard import FormWizard
+from django.shortcuts import render_to_response
from django import forms
+import models
+
+class FileForm1(forms.Form):
+ subject = forms.CharField(max_length=100)
+ sender = forms.EmailField()
+
+class FileForm2(forms.ModelForm):
+ fields = ('towns',)
+ class Meta:
+ model = models.File
+
+class FileWizard(FormWizard):
+ def get_template(self, step):
+ return ['templates/file_wizard_%s.html' % step,
+ 'file_wizard.html']
+
+ def done(self, request, form_list):
+ return render_to_response('done.html', {
+ 'form_data': [form.cleaned_data for form in form_list],
+ })