This repository has been archived by the owner. It is now read-only.

wiki: Fix rss. #691

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+4 −29
Diff settings

Always

Just for now

@@ -626,7 +626,7 @@ def render(self, thing, *a, **kw):
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
@@ -95,7 +95,7 @@ def __init__(self, listing, page=None):
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 @@ def __init__(self, inner_content, page=None, may_revise=False,
self.pagetitle = action[1]
else:
self.pagetitle = None
-
- self.inner_content = inner_content
page_classes = None
@@ -138,7 +136,7 @@ def __init__(self, inner_content, page=None, may_revise=False,
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):
@@ -72,7 +72,7 @@ <h2>
</h2>
</div>
%endif
- ${thing.inner_content}
+ ${thing.content()}
</div>
<!--reddit wikis are powered by Cray-1™ supercomputers-->
@@ -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}