I do have another question, what would be the self.request method to get a date string of "11/11/2008" entered into a html field to be able to add it to the data store with a field of DateProperty()?
for example to do the above i'm asking with integer it would be.. greeting.age = int(self.request.get('age')) but i'm not sure what it would be for field defined as DateProperty() On Nov 11, 8:54 pm, Toney <[EMAIL PROTECTED]> wrote: > Hi Marzia, after I cleared the data store the problem went away. Thank > you for your help > > On Nov 11, 2:38 pm, Marzia Niccolai <[EMAIL PROTECTED]> wrote: > > > Hi Toney, > > > This should work, and in fact I have not been able to replicate the issue > > using a small test example. Would it be possible to provide the actual code > > you are running? > > > -Marzia > > > On Tue, Nov 11, 2008 at 6:43 AM, Toney <[EMAIL PROTECTED]> wrote: > > > > I have an html form that has two fields, fname and age. I have one > > > Model as a string and the other as a integer. When I try to submit > > > the form I get the error... > > > > BadValueError: Property age must be an int or long, not a unicode > > > > Can anyone tell me what I may be missing. > > > > note if I remove the age field or set it's property to string the form > > > saves and the data displays with no errors, however I will want in the > > > future to be able to perform searches based integer and date. > > > > class Greeting(db.Model): > > > fname = db.StringProperty() > > > age = db.IntegerProperty() > > > > class Guestbook(webapp.RequestHandler): > > > def post(self): > > > greeting.fname = self.request.get('fname') > > > greeting.age = int(self.request.get('age')) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---