title: How to implement Django Session Wizard with multiple templates
body: <p>Im trying to implement a multi step form in django using the form wizard that comes with django-formtools and so far it steps through all the forms till the last one then instead of calling the <code>done</code> method, the page goes back to the first form. Some of my code is shown below:</p>
  
  <p><strong>Urls.py</strong></p>
  
  <pre><code>from django.urls import path
  from minereg import views
  
  urlpatterns = [
      path('',views.ContactWizard.as_view(views.FORMS),name="registration"),
  ]
  </code></pre>
  
  <p><strong>Views.py</strong></p>
  
  <pre><code>from django.shortcuts import render
  from formtools.wizard.views import SessionWizardView
  from .forms import RegForm1,RegForm2
  
  FORMS = [("home",RegForm1),("bank",RegForm2)]
  
  TEMPLATES = {"home":"home.html",
              "bank":"bank.html"}
  
  
  class ContactWizard(SessionWizardView):
      def get_template_names(self):
          return [TEMPLATES[self.steps.current]]
  
      def done(self,form_list, **kwargs):  #Required
          form_data = [form.cleaned_data for form in form_list]
          print(form_data)
  
          return render(self.request,template_name = "thanks.html")
  </code></pre>
  
  <p>The <code>print(form_data)</code> in the <code>done</code> method doesn't happen, showing the code never gets to that point.</p>
  
  <p><strong>home.html</strong></p>
  
  <pre><code>{% extends "base.html" %}
  {% load widget_tweaks %}
  {% load i18n %}
  {% block content %}  
  
  &lt;p&gt;Step {{ wizard.steps.step1 }} of {{ wizard.steps.count }}&lt;/p&gt;
  &lt;form action="{%url 'registration' %}" method='post'&gt;
    {% csrf_token %}
  
    {{wizard.management_form}}
  
    &lt;div class="container col-md-9"&gt;
      &lt;h1&gt;PERSONAL DETAILS&lt;/h1&gt;
      &lt;p&gt;Please fill in this form to create an account.&lt;/p&gt;
  &lt;hr&gt;
  
  
      &lt;!-- Name --&gt;
      &lt;div class="row"&gt;
        &lt;div class="form-group col-md-4"&gt;
  
            {{ wizard.form.name.label_tag }}
  
            {{ wizard.form.name|add_class:"form-control form-control-lg" }}
        &lt;/div&gt;
        &lt;div class="form-group col-md-4"&gt;
          {{ wizard.form.middle_name.label_tag }}
  
          {{ wizard.form.middle_name|add_class:"form-control form-control-lg" }}
        &lt;/div&gt;
        &lt;div class="form-group col-md-4"&gt;
          {{ wizard.form.last_name.label_tag }}
  
          {{ wizard.form.last_name|add_class:"form-control form-control-lg" }}
        &lt;/div&gt;
  
      &lt;/div&gt;
  
      &lt;!-- DOB --&gt;
      &lt;div class="row"&gt;
        &lt;div class="form-group col-md-4"&gt;
          {{ wizard.form.date_of_birth.label_tag }}
  
          {{ wizard.form.date_of_birth|add_class:"form-control form-control-lg" }}
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;!-- EMAIL &amp; NUMBER --&gt;
      &lt;div class="row"&gt;
        &lt;div class="form-group col-md-8"&gt;
          {{ wizard.form.email.label_tag }}
  
          {{ wizard.form.email|add_class:"form-control form-control-lg" }}
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="row"&gt;
        &lt;div class="form-group col-md-8"&gt;
          {{ wizard.form.mobile_number.label_tag }}
  
          {{ wizard.form.mobile_number|add_class:"form-control form-control-lg" }}
        &lt;/div&gt;
  
      &lt;!-- ADDRESS --&gt;
      &lt;div class="row"&gt;
        &lt;div class="form-group col-md-8"&gt;
          {{ wizard.form.address.label_tag }}
  
          {{ wizard.form.address|add_class:"form-control form-control-lg" }}
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="row"&gt;
        &lt;div class="form-group col-md-4"&gt;
          {{ wizard.form.suburb.label_tag }}
  
          {{ wizard.form.suburb|add_class:"form-control form-control-lg" }}
        &lt;/div&gt;
        &lt;div class="form-group col-md-4"&gt;
          {{ wizard.form.state.label_tag }}
  
          {{ wizard.form.state|add_class:"form-control form-control-lg" }}
        &lt;/div&gt;
        &lt;div class="form-group col-md-4"&gt;
          {{ wizard.form.postcode.label_tag }}
  
          {{ wizard.form.postcode|add_class:"form-control form-control-lg" }}
        &lt;/div&gt;
  
      &lt;/div&gt;
  
  &lt;hr&gt;
  
  
      &lt;p&gt;By creating an account you agree to our &lt;a href="#"&gt;Terms &amp; Privacy&lt;/a&gt;.&lt;/p&gt;
  
      &lt;button name="wizard_goto_step" type="submit" value="{{ wizard.steps.next }}"&gt; Next step &lt;/button&gt;
  
      &lt;/form&gt;
      {% endblock %}
  </code></pre>
  
  <p><strong>bank.html</strong></p>
  
  <pre><code>{% extends "base.html" %}
  {% load widget_tweaks %}
  {% load i18n %}
  
  
  
  {% block content %}  
  
  &lt;p&gt;Step {{ wizard.steps.step1 }} of {{ wizard.steps.count }}&lt;/p&gt;
  &lt;form action="{%url 'registration' %}" method='post'&gt;
      {% csrf_token %}
      {{wizard.management_form}}
  
    &lt;div class="container col-md-9"&gt;
      &lt;h1&gt;BANKING AND SUPERANNUATION DETAILS&lt;/h1&gt;
      &lt;p&gt;Please fill in this form to create an account.&lt;/p&gt;
      &lt;hr&gt;
  
  
  
  &lt;!-- ACCOUNT NAME --&gt;
  &lt;div class="row"&gt;
      &lt;div class="form-group col-md-4"&gt;
        {{ wizard.form.account_name.label_tag }}
  
        {{ wizard.form.account_name|add_class:"form-control form-control-lg" }}
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;!-- BSB --&gt;
    &lt;div class="row"&gt;
      &lt;div class="form-group col-md-8"&gt;
        {{ wizard.form.bsb.label_tag }}
  
        {{ wizard.form.bsb|add_class:"form-control form-control-lg" }}
      &lt;/div&gt;
    &lt;/div&gt;
  
      &lt;!-- ACCOUNT NUMBER --&gt;
      &lt;div class="row"&gt;
          &lt;div class="form-group col-md-8"&gt;
            {{ wizard.form.account_number.label_tag }}
  
            {{ wizard.form.account_number|add_class:"form-control form-control-lg" }}
          &lt;/div&gt;
        &lt;/div&gt;
  
       &lt;!-- FUND NAME --&gt;
    &lt;div class="row"&gt;
      &lt;div class="form-group col-md-8"&gt;
        {{ wizard.form.fund_name.label_tag }}
  
        {{ wizard.form.fund_name|add_class:"form-control form-control-lg" }}
      &lt;/div&gt;
    &lt;/div&gt;
  
      &lt;!-- MEMBER NUMBER --&gt;
      &lt;div class="row"&gt;
          &lt;div class="form-group col-md-8"&gt;
            {{ wizard.form.member_number.label_tag }}
  
            {{ wizard.form.member_number|add_class:"form-control form-control-lg" }}
          &lt;/div&gt;
        &lt;/div&gt;
  
  &lt;/div&gt;
  
      &lt;hr&gt;
  
      &lt;p&gt;By creating an account you agree to our &lt;a href="#"&gt;Terms &amp; Privacy&lt;/a&gt;.&lt;/p&gt;
  
      &lt;input type="submit" value="{{ wizard.steps.next }}"/&gt;
  
  
  &lt;/form&gt;
  {% endblock %}
  </code></pre>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>from django import forms
  
  class RegForm1(forms.Form):
      name = forms.CharField(max_length=50)
      middle_name = forms.CharField(max_length=50)
      last_name = forms.CharField(max_length=50)
      date_of_birth = forms.CharField(max_length=50)
      email = forms.CharField(max_length=50)
      mobile_number = forms.CharField(max_length=50)
      address = forms.CharField(max_length=50)
      suburb = forms.CharField(max_length=50)
      state = forms.CharField(max_length=50)
      postcode = forms.CharField(max_length=50)
  
  
  class RegForm2(forms.Form):
      account_name = forms.CharField(max_length=50)
      bsb = forms.CharField(max_length=50)
      account_number = forms.CharField(max_length=50)
      fund_name = forms.CharField(max_length=50)
      member_number = forms.CharField(max_length=50)
  </code></pre>
  
  <p>Hopefully someone can see what I'm missing.</p>