예제 #1
0
 def GET(self):
     posts = post_service.get_all_published()
     _archives = post_service.get_archives()
     archives = []
     tags = tag_service.get_published()
     for archive in _archives:
         archives.append(
             {
                 "full_month": calendar.month_name[archive.month],
                 "month": archive.month,
                 "year": archive.year,
                 "posts_count": archive.posts_count,
             }
         )
     return render.archive(posts, tags, archives)
 def GET(self):
     topics = tag_service.get_published()
     totalTopics = tag_service.count_all()
     totalTopicsPublished = len(topics)
     totaltopicsUnpublished = tag_service.count_unpublished()
     return render.topics(totalTopics, totalTopicsPublished, totaltopicsUnpublished, topics)