Commits

Alessandro Molina committed d73d0da

Add before_view hook

  • Participants
  • Parent commits 58e8a8f

Comments (0)

Files changed (1)

File smallpress/controllers/root.py

         if not visible:
             return redirect(plug_url('smallpress', '/'))
 
+        hooks = config['hooks'].get('smallpress.before_view_article', [])
+        for func in hooks:
+            func(article, kw)
+
         return dict(article=article)
 
     @require(predicates.in_group('smallpress'))