diff --git a/r2/r2/lib/jsontemplates.py b/r2/r2/lib/jsontemplates.py index 049672196..a5b7711b7 100755 --- a/r2/r2/lib/jsontemplates.py +++ b/r2/r2/lib/jsontemplates.py @@ -626,7 +626,7 @@ class TrafficJsonTemplate(JsonTemplate): class WikiJsonTemplate(JsonTemplate): def render(self, thing, *a, **kw): try: - content = thing.inner_content + content = thing.content() except AttributeError: content = thing.listing return ObjectTemplate(content.render() if thing else {}) diff --git a/r2/r2/lib/pages/wiki.py b/r2/r2/lib/pages/wiki.py index fc05fe404..5622d6797 100644 --- a/r2/r2/lib/pages/wiki.py +++ b/r2/r2/lib/pages/wiki.py @@ -95,7 +95,7 @@ class WikiPageDiscussions(Templated): class WikiBasePage(Reddit): extra_page_classes = ['wiki-page'] - def __init__(self, inner_content, page=None, may_revise=False, + def __init__(self, content, page=None, may_revise=False, actionless=False, alert=None, description=None, showtitle=False, **context): pageactions = [] @@ -125,8 +125,6 @@ class WikiBasePage(Reddit): self.pagetitle = action[1] else: self.pagetitle = None - - self.inner_content = inner_content page_classes = None @@ -138,7 +136,7 @@ class WikiBasePage(Reddit): Reddit.__init__(self, extra_js_config={'wiki_page': page}, show_wiki_actions=True, page_classes=page_classes, - **context) + content=content, **context) class WikiPageView(WikiBasePage): def __init__(self, content, page, diff=None, renderer='wiki', **context): diff --git a/r2/r2/templates/wikibasepage.html b/r2/r2/templates/wikibasepage.html index 658c41a9e..2c2a5d743 100644 --- a/r2/r2/templates/wikibasepage.html +++ b/r2/r2/templates/wikibasepage.html @@ -72,7 +72,7 @@ %endif - ${thing.inner_content} + ${thing.content()} diff --git a/r2/r2/templates/wikibasepage.xml b/r2/r2/templates/wikibasepage.xml deleted file mode 100644 index 17c169dc1..000000000 --- a/r2/r2/templates/wikibasepage.xml +++ /dev/null @@ -1,23 +0,0 @@ -## The contents of this file are subject to the Common Public Attribution -## License Version 1.0. (the "License"); you may not use this file except in -## compliance with the License. You may obtain a copy of the License at -## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public -## License Version 1.1, but Sections 14 and 15 have been added to cover use of -## software over a computer network and provide for limited attribution for the -## Original Developer. In addition, Exhibit A has been modified to be -## consistent with Exhibit B. -## -## Software distributed under the License is distributed on an "AS IS" basis, -## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -## the specific language governing rights and limitations under the License. -## -## The Original Code is reddit. -## -## The Original Developer is the Initial Developer. The Initial Developer of -## the Original Code is reddit Inc. -## -## All portions of the code written by reddit are Copyright (c) 2006-2013 -## reddit Inc. All Rights Reserved. -############################################################################### - -${thing.content}