Using the Google App Store guest book demo as an example, when you write a record on multiple lines and save it, when reading and displaying, one line is displayed.
How can we make it look like it was originally introduced, on several lines?
The database is as follows:
class Greeting(db.Model): author = db.UserProperty() content = db.StringProperty(multiline=True) date = db.DateTimeProperty(auto_now_add=True)
And the sending form is as follows:
self.response.out.write(""" <form action="/sign" method="post"> <div><textarea name="content" rows="3" cols="60"></textarea></div> <div><input type="submit" value="Sign Guestbook"></div> </form> </body> </html>""")
source share