Commits

Sam Hart  committed d669a92

finish up the entry search by titel

  • Participants
  • Parent commits 80ab3c2

Comments (0)

Files changed (1)

File src/noink/entryDB.py

         self.eventLog.add('add_entry', author.id, False, entry.title)
         return e
 
+    def findByTitle(self, title):
+        '''
+        Finds entries based upon the title. Can search using sub-strings.
+
+        @param title: The title of the post (or sub-string of title).
+
+        @return Array containing one or more entry objects, or None.
+        '''
+        return Entry.query.filter(Entry.Entry.title.like("%%%s%%" % title)).all()
+