2

So i have a simple form that takes a few inputs (two text and two textareas) and runs it through a function that puts all four inputs into the datastore (google app engine). The problem is when I have a decent amount of text in one of the s (meaning, 5 paragraphs, ~4/5 sentences each, ..2,000 characters).

I am using TextProperty() s in the datastore, (and also StringProperty for the smaller inputs). It works when I only put in like a few words for each, but not when I put in a decent amount of text, what happens: a blank webpage comes up instead of my basic confirmation page. No data is transferred into the datastore.

My handler uses get() (as opposed to POST)

Why is this happening and how do I fix it? I'm sure this is a simple fix, but I am somewhat green to this. Thanks

Igor Artamonov
  • 35,450
  • 10
  • 82
  • 113
Kurt J
  • 2,558
  • 24
  • 17

1 Answers1

3

While in theory there is no limit, in practice all the browsers apply some limits to the query string and since you are using GET instead of POST all your inputs are passed as query parameters in the URL.

When you are getting values from input forms, you should use the proper method="POST" in the <form> and handle that correctly in your handler using post(). If you go through the Getting Started you will find out the section for Handling Forms.

Community
  • 1
  • 1
Lipis
  • 21,388
  • 20
  • 94
  • 121
  • 1
    Using POST is far better than using GET in general, too - GET is assumed to be idempotent, so you should never do anything that has side effects in a GET request. – Nick Johnson Jun 22 '12 at 07:07