diff backend/couchdb/FeedEntry.py @ 169:91a24f499318

introdue an abstraction for the name of the database so it can be changed via commandline parameter
author dirk
date Fri, 09 Sep 2011 14:52:54 +0200
parents e284a37df1d9
children 27be2a5f9c10
line wrap: on
line diff
--- a/backend/couchdb/FeedEntry.py	Mon Sep 05 19:43:34 2011 +0200
+++ b/backend/couchdb/FeedEntry.py	Fri Sep 09 14:52:54 2011 +0200
@@ -1,6 +1,7 @@
 
 from couchdb.mapping import BooleanField, DateTimeField, Document, TextField
 from datetime import datetime
+import CouchDb
 
 class FeedEntry(Document):
     doctype = TextField(default="feedEntry")
@@ -14,7 +15,7 @@
 
     @staticmethod
     def findByLink(link, database):
-        result = FeedEntry.view(database, "feedtest/feedEntry_by_link", key=link)
+        result = FeedEntry.view(database, CouchDb.feedEntryByLink(), key=link)
         try:
             return iter(result).next()
         except StopIteration: