Zeynel <azeyn...@gmail.com> wrote: >On Jan 16, 3:24 pm, TomF <tomf.sess...@gmail.com> wrote: > >> vote refers to the Vote instance. > >So he must have instatiated previously like > >vote = Vote()
No, it's the line immediately above the one you asked about: if vote is None: vote = Vote(key_name = user.email(), parent = quote) if vote.vote == newvote: return If "vote" is empty, it creates a Vote object and assigns it to "vote". It then checks the "vote" member of that object. >class Item(db.Model): > title = db.StringProperty() > url = db.StringProperty() > date = db.DateTimeProperty(auto_now_add=True) > author = db.UserProperty() > >and to write to the database I do > > item = Item() > item.title = self.request.get("title") > item.url = self.request.get("url") > item.author = users.get_current_user() > item.put() > self.redirect("/newest") > >so his vote.vote is like my item.url ? Exactly. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list