wiki: Replace inner_content nonsense.

This commit is contained in:
Andre D
2013-03-07 16:02:39 -05:00
committed by Neil Williams
parent bfba7ba69a
commit 8aed93b558
4 changed files with 4 additions and 29 deletions

View File

@@ -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 {})

View File

@@ -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):

View File

@@ -72,7 +72,7 @@
</h2>
</div>
%endif
${thing.inner_content}
${thing.content()}
</div>
<!--reddit wikis are powered by Cray-1™ supercomputers-->

View File

@@ -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}