How to store data in a data warehouse - AppEngine

I am new to Python and AppEngine.

I am trying to use Feedparser to cache a feed in a data store.

My code is at http://pastebin.com/uWPdWUm2

For some reason, it doesn't work - it doesn't add data to the datastore.

Any ideas? I'm stumped.

+2


a source to share


2 answers


You just forgot to use parentheses in 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()

      

+5


a source


Are you sure you are getting value adjustments or from the parser in general? You tried to register them. Also for discussion, if you think it x.put

doesn't work, detach that and check that only eg.

x = FeedEntry3()
x.title = "test title"
x.link = "test link"
x.content = "test content"
x.put()

      



Have you tried this, does it work? if it works, chances are you are not getting the values ​​from feedparser, debug and log that.

0


a source







All Articles