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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:55:48+00:00 2026-06-11T22:55:48+00:00

How webapp2 get checkbox values from jinja2 templates, and the name is the same

  • 0

How webapp2 get checkbox values from jinja2 templates, and the name is the same ? Is the data structure is Dict ? How can get it and pass it ?

html templates:

…

{% for tablename in tablenames %}
<input type = "checkbox" name = "tn">{{tablename}}
{% endfor %}

…

main.py:

tn = self.request.get('tn')

Thank you guys : )

How get the checkbox value and pass it into tn ?

  • 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-11T22:55:49+00:00Added an answer on June 11, 2026 at 10:55 pm

    I think your template should be…

    {% for tablename in tablenames %}
        <input type="checkbox" name="tn" value="{{ tablename }}" />
    {% endfor %}
    

    And the code should be (I believe that .GET also handles .POST vars as well in WebApp2):

    tn = self.request.GET['tn']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This line of code: contract = Contract.get_by_id(contract_id) From this block: class MainHandler(webapp2.RequestHandler): def get(self):
From this block of code: class MainHandler(webapp2.RequestHandler): def get(self): template_values = {given_sentence:'put a sentence
I am building a webapp with jquery mobile where I need to get data
I am using appengine webapp2 as wsgihandler, jinja2 as the template engine and wtforms
A very simple use case for creating users in webapp2/appengine can be as follows:
I'm trying to follow the Auth example for Webapp2 that can be found here:
I get a strange error message when trying to read non-ascii from the datastore:
I want to resolve a status 405 that I get from the task queue
I'm using Python 2.7 in Google App Engine and can't seem to get my
I have a GAE + webapp2 app and i get this error for href

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.