title: How to get FormPreview from Django FormTools to work?
body: <p>I have tried to create a minimal working example of FormPreview of <a href="http://django-formtools.readthedocs.io/en/latest/preview.html" rel="nofollow noreferrer">Django FormTools</a>, but it did not work.</p>
  
  <h1>forms.py</h1>
  
  <p>This is a very simple form.</p>
  
  <pre><code>from django.forms import CharField, Form, Textarea
  
  
  class TextForm(Form):
      text = CharField(widget=Textarea)
  </code></pre>
  
  <h1>preview.py</h1>
  
  <p>This is with slight adjustments just copied from the documentation. It is of curse incomplete but I did not changed it because I did not even got to a preview page of any kind.</p>
  
  <pre><code>from django.http import HttpResponseRedirect
  
  from formtools.preview import FormPreview
  
  
  class TextFormPreview(FormPreview):
      def done(self, request, cleaned_data):
          # Add stuff later, once I get to a preview.
          return HttpResponseRedirect('/')
  </code></pre>
  
  <h1>urls.py</h1>
  
  <p>Here must be some mistake, but I don't know how it should be correct. Should I remove the first URL? How does FormPreview know what the correct view to use is?</p>
  
  <pre><code>from django.conf.urls import url
  from django import forms
  
  from .forms import TextForm
  from .preview import TextFormPreview
  
  from . import views
  
  urlpatterns = [
      url(r'^$', views.textform),
      url(r'^post/$', TextFormPreview(TextForm)),
  ]
  </code></pre>
  
  <h1>views.py</h1>
  
  <p>My simple views.py.</p>
  
  <pre><code>from django.shortcuts import render
  
  from .forms import TextForm
  
  
  def textform(request):
      if request.method == 'POST':
          form = TextForm(request.POST)
          if form.is_valid():
              text = form.cleaned_data['text']
              print(text)
      if request.method == 'GET':
          form = TextForm
  
      context = {
          'form': form
      }
      return render(request, 'text.html', context)
  </code></pre>
  
  <h1>templates/text.html</h1>
  
  <p>And a simple template.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Text&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form action="" method="post"&gt;
      {% csrf_token %}
      {{ form.non_field_errors }}
      &lt;div class="fieldWrapper"&gt;
          {{ form.manual_recipients.errors }}
          {{ form.text }}
      &lt;/div&gt;
      &lt;input type="submit" value="OK"/&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <h1>templates/base.html</h1>
  
  <p>base.html is just an empty file. If I go to ^post/$ it says it requires a base.html. Why? I do not know.</p>
  
  <p>As said, I did all the steps from the documentation but it is obviously incomplete. How do I fix it?</p>