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
-~----------~----~----~----~------~----~------~--~---

Reply via email to