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 8363353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:09:24+00:00 2026-06-09T12:09:24+00:00

I am trying to build a django form wizard to allow people to register

  • 0

I am trying to build a django form wizard to allow people to register for an
event. I can get through the form wizard and see data in the done method.
The problem is that I also need event_id passed into done also. How do I get
event_id from the url through the form wizard and into done? Simple example?

------- urls.py ---------
named_register_forms2 = (
    ('basicdata', SeatsForm),
    ('form2', AnotherForm),
)

urlpatterns = patterns('',
    url(r'^register/(?P<event_id>\d+)/$', register_wizard, name='register_step'),
)

------ forms.py -----------
class SeatsForm(forms.ModelForm):

  class Meta:
    model = MyModel
    fields = [ 'last_name', 'first_name', 'address1', 'address2', 
               'city', 'state', 'zipcode', 'phone_number', 'email']

  def __init__(self, *args, **kwargs):
      super(SeatsForm, self).__init__(*args, **kwargs)

class RegisterWizard(SessionWizardView):
    #storage_name = 'formtools.wizard.storage.session.SessionStorage'
    template_name = 'wizard_form.html'

    def done(self, form_list, **kwargs):
        data = {}
        for form in form_list:
                data.update(form.cleaned_data)
                print data
        # I need event_id right here.  How to get it?
        return render_to_response('done.html', {
            'form_data': [form.cleaned_data for form in form_list],
    })
  • 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-09T12:09:25+00:00Added an answer on June 9, 2026 at 12:09 pm

    I think you will have to put that in the form and get it from there.

    If its model form you can pass instance_dict param to the wizard view. instance_dict param. However in that case you will have to implement a wrapper view that will prepare the wizard view with these params. Something like this:

    def wrapper_view(request, id):
        #somecode
        seats_instance = SeatsModel.objects.get(id=id)
        another_instance = AnotherModel.objects.get(id=id)
        inst_dict = { '0': seats_instance,
                      '1': another_instance
                    }
        return RegisterWizard.as_view(named_register_forms2, instance_dict=inst_dict)(request)
    
    class RegisterWizard(SessionWizardView):
        #storage_name = 'formtools.wizard.storage.session.SessionStorage'
        template_name = 'wizard_form.html'
    
        def done(self, form_list, **kwargs):
            data = {}
            seatform= form_list[0]
            seatinst = form.save()    
            #save other forms
            ...
            #using seatinst get event id
    
            return render_to_response('done.html', {
                'form_data': [form.cleaned_data for form in form_list],
                 })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I' m trying to build a Django TemplateLoader, but I can't make it 'see'
I am trying to build my first Django app but I can't get the
I'm trying to build a better/more powerful form class for Django. It's working well,
I am new to Django and I am trying to build a data hierarchy
I am trying to build custom django form for changing username and user email
After working through the Django tutorial I'm now trying to build a very simple
I'm new to both django and python and currently trying to build a form
I'm trying to build my own custom django form widgets (putting them in widgets.py
I'm a Beginner, trying to build a django project that runs on Google App
I'm learning Python, Django, Javascript and jQuery by trying to build a simple shopping

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.