Commits

David Chambers  committed 0b808a0

Replaced calls to defunct `utils.documents` with calls to `utils.get_documents`.

  • Participants
  • Parent commits d661bb0

Comments (0)

Files changed (2)

     todo = FEED_MAX_POSTS
     all = todo == 0
 
-    for post in utils.documents():
+    posts, pages = utils.get_documents()
+    for post in posts:
         if todo or all:
             required = {
                 'title':       lambda: post.title,
 
 def tags(request):
     tags = {}
-    for document in utils.documents():
+    posts, pages = utils.get_documents()
+    for document in posts + pages:
         for tag in document.meta.get('tags', []):
             tags[tag] = tags.get(tag, 0) + 1
     tags = [(key, value) for key, value in sorted(tags.items(), key=lambda pair: pair[0].lower())]
 
 def tagged_as(request, tag):
     tag = slugify(tag)
+    posts, pages = utils.get_documents()
     return render_to_response('tag.dhtml', dict({
                 'tag': tag,
-                'tagged': [doc for doc in utils.documents() if tag in [slugify(t) for t in doc.meta.get('tags', [])]],
+                'tagged': [doc for doc in posts + pages if tag in [slugify(t) for t in doc.meta.get('tags', [])]],
             }, **context_defaults(request)))
 
 def post(request, path, view_source=False):