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

  • Home
  • SEARCH
  • 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 5943035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:20:16+00:00 2026-05-22T16:20:16+00:00

Is it possible to create a textbox in HTML, type a string into it,

  • 0

Is it possible to create a textbox in HTML, type a string into it, click a “save” button, store that information onto a GAE datastore model and have the text stay displayed in the textbox and saved in the datastore?

The HTML is on a separate file, just rendered through my main.py file using

class MainPage(webapp.RequestHandler):
def get(self):

    template_values = {}
    path = os.path.join(os.path.dirname(__file__), 'index.html')
    self.response.out.write(template.render(path, template_values))

What I tried for my problem is this:

class equipmentBox(db.Model):
    equipCode = db.StringProperty()

class equipmentBoxGet(webapp.RequestHandler):
    def post(self):
  • 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-22T16:20:17+00:00Added an answer on May 22, 2026 at 4:20 pm

    I think this will help, i have modified default guestbook app for you. Usual way of doing is having html files separately and using templates to render it. Here everything is just embedded into the controller itself

    import cgi
    
    from google.appengine.api import users
    from google.appengine.ext import webapp
    from google.appengine.ext.webapp.util import run_wsgi_app
    from google.appengine.ext import db
    
    class EquipmentBox(db.Model):
          equipCode = db.StringProperty()
    
    
    class MainPage(webapp.RequestHandler):
      def get(self):
        self.response.out.write('<html><body>')
    
        equips = db.GqlQuery("SELECT * FROM EquipmentBox")
    
        for equip in equips:
    
          self.response.out.write('<blockquote>%s</blockquote>' %
                                  cgi.escape(equip.equipCode))
    
        # Write the submission form and the footer of the page
        self.response.out.write("""
              <form action="/post" method="post">
                <div><input type="text" name="equip_code" /></div>
                <div><input type="submit" value="post equipcode"></div>
              </form>
            </body>
          </html>""")
    
    class EquipBox(webapp.RequestHandler):
      def post(self):
        equip = EquipmentBox()
        equip.equipCode = self.request.get('equip_code')
        equip.put()
        self.redirect('/')
    
    application = webapp.WSGIApplication(
                                         [('/', MainPage),
                                          ('/post', EquipBox)],
                                         debug=True)
    
    def main():
      run_wsgi_app(application)
    
    if __name__ == "__main__":
      main()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a program that will enter a string into the
Possible Duplicate: Create WPF TextBox that accepts only numbers How i can check if
Is it possible to create a textbox or other control that is bound to
Is it possible to create a macro or stylesheet so that when a TextBox
Is It possible that if I create two TextBoxes. When the first TextBox is
Possible Duplicate: Create Excel file in Java How to save output in excel format
Is it possible to create a trigger that will not be in a transaction?
Is it possible to create Selenium tests using the Firefox plugin that use randomly
It's possible to create digrams in SQL Server 2000 that can be useful to
So I want to create a text box static if possible that when my

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.