python - Creating a Google App Engine datastore entity without initializing a particular property -


I have a class entity, which has the property name , and students . I want to make the unit first, then add value to student property later. But I'm not sure how to do this. I've tried null (I'm sorry if this is disgusting, new to Python) but it gives an error message. This is my class definition

  class category (ndb.model): name = ndb.StringProperty (required = true) students = ndb.KeyProperty (repeated = true) ...   

and handler for my class model

  class classhandler (webapp2.RequestHandler): def post (self): name = self.request .get ('class_name') callback = self.request.get ('callback') class = class.get_by_id (name) if class: Self.error (409) Other: n = self.request.get ('class_name') Class = class (id = n, class_name = n, member) # & lt; & Lt; & Lt; --- // This is the place where the stuck team. Put () If Callback: self.response.write (call Previous + '(' + Team to JSN (+) ') Other: Write a self-response. (Team.Jason ())   

I have been looking at a solution for the last two hours on Google. Any suggestions on what I have to do will be appreciated.

Edit: I get this error message when I null  Enter image details here

I'm not sure when you are talking about "null" or someone, then what are you talking about.

To add such students Any method that you need to provide list of students in the constructor Html>

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -