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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:05:27+00:00 2026-06-10T19:05:27+00:00

I have a basic class: class Post (db.Model): title = db.StringProperty(required = True) text

  • 0

I have a basic class:

class Post (db.Model):
    title = db.StringProperty(required = True)
    text = db.TextProperty(required = True)
    created = db.DateTimeProperty(auto_now_add = True).

new_record = Post(title = "TESSSST", text = "TESSST") 
new_record.put() #works!

And it is works fine – the instances are created and the data is written. But as soon as I remove “required=true” property is no longer stored in the datastore:

class Post (db.Model):
    title = db.StringProperty(required = True)
    text = db.TextProperty  
    created = db.DateTimeProperty(auto_now_add = True)

new_record = Post(title = "TESSSST")
new_record.text = "Burn conctructor!"
new_record.put() # text property won't be saved

I don’t know if it be helpful but when I checking properties via print new_record.__dict__ all values that was assigned by constructor has ‘_’ prefix (like ‘_title’) and other don’t have (just ‘text’).

So the question is “Is it possible to save to datastore non required (and not initialised by constructor) properies?” I couldn’t find answer in gae docs.

  • 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-10T19:05:29+00:00Added an answer on June 10, 2026 at 7:05 pm

    But you haven’t just removed required=True, you’ve removed the brackets () which instantiate the field. It should be

    text = db.TextProperty()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic Django model like: class Business(models.Model): name = models.CharField(max_length=200, unique=True) email
Lets say we have some basic AR model. class User < ActiveRecord::Base attr_accessible :firstname,
if I have basic model for keeping track of client art: class ArtEntry(models.Model): client
I have a 'ProjectRecord' model with several filefields: class ProjectRecord(models.Model): prjname = models.CharField(max_length=200, unique=True)
I have a basic class that derived subclasses inherit from, it carries the basic
I have a basic Window class that I need to have events such as
I have a very basic data class that is subclassed from NSObject. I declare
I have a library which has a basic class which is used extensively by
Consider I have a game-creation framework, with a basic class called Game. // Action
I have a basic invoice setup with models: Invoice, Item, LineItems. # invoice.rb class

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.