Skip to content

Commit

Permalink
[#2375] speed rendering of home page
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Aug 3, 2012
1 parent c7bfd3e commit 3123bc4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ckan/controllers/home.py
Expand Up @@ -104,9 +104,10 @@ def index(self):
if msg:
h.flash_notice(msg, allow_html=True)

c.recently_changed_packages_activity_stream = \
ckan.logic.action.get.recently_changed_packages_activity_list_html(
context, {})
@property
def recently_changed_packages_activity_stream():
return ckan.logic.action.get.recently_changed_packages_activity_list_html(context, {})
c.recently_changed_packages_activity_stream = recently_changed_packages_activity_stream

# START OF DIRTYNESS
def get_group(id):
Expand Down

2 comments on commit 3123bc4

@lfalvarez
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having a little bit of trouble with this, when I try to render this like using this
{{ c.recently_changed_packages_activity_stream }}
I get this
<property object at 0xb517abbc>
how can I get the value of this property?.

@tobes
Copy link
Contributor Author

@tobes tobes commented on 3123bc4 Nov 15, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lfalvarez

I cannot replicate this error with either the jinja2 or genshi templates - the template I amended was home/index.html. The property should be processed for you automatically. I tested using the lastest version of master please update.

Please email the ckan dev list http://lists.okfn.org/mailman/listinfo/ckan-dev or visit us on irc at freenode.net #ckan for further support.

Please sign in to comment.