Sorry, the put process actually reads:

putTotal = TotalDistance(
            count = tdMod
         )

On Feb 14, 8:57 am, Neversummer <wrigh...@gmail.com> wrote:
> I am new to app engine and pyton and unfortunately am not able to
> accomplish a seemingly simple task - thanks for your patience.
>
> I want to store a total miles value, which I am doing in model
> TotalDistance. As each new entry is submitted I want to increment that
> value. So I am getting the total value, then simply trying to add the
> new entry to the existing total. I've tried this a number of different
> ways, but keep getting the same error.
>
> // This is how I have defined TotalDistance
> class TotalDistance(db.Model):
>         count = db.IntegerProperty(required=True, default=0)
>
> // Here's the offending code
> //---  this all resides in def post(self) ---//
> tdResult = TotalDistance.all()
> tdCurr = tdResult.count
> tempDistance = int(self.request.get('distance')) # from the form
> tdMod = tdCurr+tempDistance
> putTotal = TotalDistance(
>            total = tdMod
>         )
> putTotal.put()
>
> // and the error
> receive the following error:
>
>  tdMod = tdCurr+tempDistance
> TypeError: unsupported operand type(s) for +: 'instancemethod' and
> 'int'
>
> Thanks for your help.
--~--~---------~--~----~------------~-------~--~----~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to