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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:49:34+00:00 2026-05-15T07:49:34+00:00

My view calls some backend classes which need some user input. When user input

  • 0

My view calls some backend classes which need some user input. When user input is required, i halt processing and store the questions into the session – request.session['questions']. request.session['questions'] is a list of dictionaries. e.g.

request.session['question'] = []
request.session['question'].append({'question' : 'Whats your firstname', 'answer' : ''})
request.session['question'].append({'question' : 'Whats your firstname', 'answer' : ''})

I need to display these questions to the user along with an input box for each question. When the user submits the form, I need to dump the input into the answers part of the session variable. Could someone show me how to do this? I’m a little lost as this isn’t really based on Django forms or models as such.

Thanks

  • 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-05-15T07:49:35+00:00Added an answer on May 15, 2026 at 7:49 am

    You could use forms that aren’t associated with models, like this:

    class QuestionForm(forms.Form):
        answer = forms.CharField()
    
    def questions(request):
        if request.method == 'POST':
            form = QuestionForm(request.POST) 
            if form.is_valid():
                # Process the data in form.cleaned_data
                return HttpResponseRedirect('/done/')
        else:
            form = QuestionForm() # An unbound form
    
        return render_to_response('questions.html', {'form': form,})
    

    More documentation here.

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

Sidebar

Related Questions

I have a view my Django application which when invoked calls my backend. My
My function below calls a partial view after a user enters a filter-by string
I have a view called, clients which shows a list of calls from the
In most of the MVP examples I've seen, the presenter calls some service, which
I have my own view with some values. How i can call on click
I would like to keep model binding when doing ajax calls from my view.
I have two different views that makes upwards of 500 partial view calls each
I have some calls that must execute sequentially. Consider an IService that has a
Ok guys. What I'm trying to do: I've got some backend code written in
I have a backend data management console written with CakePHP that allows a user

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.