Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7901665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:16:59+00:00 2026-06-03T09:16:59+00:00

I was looking at the documentation and I am not quite sure how to

  • 0

I was looking at the documentation and I am not quite sure how to use different templates for each step…

I looked into the source code and it seems that the template name is hardcoded:

class WizardView(TemplateView):
    """
    The WizardView is used to create multi-page forms and handles all the
    storage and validation stuff. The wizard is based on Django's generic
    class based views.
    """
    storage_name = None
    form_list = None
    initial_dict = None
    instance_dict = None
    condition_dict = None
    template_name = 'formtools/wizard/wizard_form.html'

...........

The docs say something about mixins, but I am not sure how to use them since I just started with django…

Thanks


UPDATE:

I looked further into the source code and realized that there is a method get_template_names.

I tried:

class AddWizard(SessionWizardView):
        def get_template_names(self, step):
                if step == 0:
                        return 'business/add1.html'
                return 'business/add2.html'
        def done(self, form_list, **kwargs):
                return render_to_response('business/done.html', {
                        'form_data': [form.cleaned_data for form in form_list],
                })

But got an error:

get_template_names() takes exactly 2 arguments (1 given)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:17:00+00:00Added an answer on June 3, 2026 at 9:17 am

    get_template_names doesn’t accept arguments. You can’t just define a new argument for a function to accept and hope the framework will pass it in! (for your future troubleshooting)

    Judging by the WizardView source, it looks like you can access the currently active step via self.steps.current which you could use in your get_template_names view to return a path containing the step.

    class AddWizard(SessionWizardView):
            def get_template_names(self):
                return ['step_{0}_template.html'.format(self.steps.current)]
    

    I’m not sure if current is a string or integer or what – but one look at the view and you should find a useful “can’t find template named X” error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for documentation on C++ code for file and directory implementation into C++
I'm looking at the List documentation. It seems the library does not provide a
Looking at the MSDN documentation, it is not quite clear to me when a
Okay so I've read the documentation, and I'm not quite sure what the arguments
There is a worksheet.title method but not workbook.title method. Looking in the documentation there
I've been looking at the Google Apps Script API documentation, and have not been
I'm looking for documentation on boost::threadpool. I downloaded the source and documentation zip files.
I've looked across this forum, and I've googled this one, and I'm not sure
I'm looking for the proper syntax to use a replicaSet. I see the documentation
I'd like to use a plugin system within my code. I've looked around for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.