Commit 16ec13b7 authored by Amber Brown's avatar Amber Brown Committed by GitHub

Merge pull request #116 from hawkowl/deprecated-on-common

Allow all types of objects with their own page to be deprecated
parents 99b0a9af 4d7d1f39
......@@ -98,7 +98,10 @@ class CommonPage(Element):
@renderer
def deprecated(self, request, tag):
return ()
if hasattr(self.ob, "_deprecated_info"):
return (tags.div(self.ob._deprecated_info, role="alert", class_="deprecationNotice alert alert-warning"),)
else:
return ()
@renderer
def source(self, request, tag):
......@@ -317,14 +320,6 @@ class ClassPage(CommonPage):
r.extend([' (via ', tail, ')'])
return r
@renderer
def deprecated(self, request, tag):
if hasattr(self.ob, "_deprecated_info"):
return (tags.div(self.ob._deprecated_info, role="alert", class_="deprecationNotice alert alert-warning"),)
else:
return ()
def functionExtras(self, data):
r = []
for b in self.ob.allbases(include_self=False):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment