I am new to Python & AppEngine.
I am trying to use Feedparser to cache a feed to a datastore.
My code is at http://pastebin.com/uWPdWUm2
For some reason it doesn't work - it does not add the data to the datastore.
Any ideas? I am stumped.
I am new to Python & AppEngine.
I am trying to use Feedparser to cache a feed to a datastore.
My code is at http://pastebin.com/uWPdWUm2
For some reason it doesn't work - it does not add the data to the datastore.
Any ideas? I am stumped.
Are you sure you are getting the values correcty or at all from feed parser? Have you tried to log them. Also for purpose of discussion if you think x.put
is not working then separate that out and test that only e.g.
x = FeedEntry3()
x.title = "test title"
x.link = "test link"
x.content = "test content"
x.put()
Have you tried that, does that work? if that works most probably you are not getting values from feedparser, debug and log that.
Your application works good; you just forgot to use parenthesis on your model declaration.
Your code:
class FeedEntry3(db.Model):
title = db.StringProperty
link = db.StringProperty
content = db.TextProperty
What it should be:
class FeedEntry3(db.Model):
title = db.StringProperty()
link = db.StringProperty()
content = db.TextProperty()