diff rhodecode/controllers/home.py @ 2937:d439d408b415 beta

Update last_change from VCS data on request. - lightweight dashboard shows now last_date also taken from db and it is fast !
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 18 Oct 2012 20:54:25 +0200
parents 62e493c7f436
children 6248c6fb1fcf
line wrap: on
line diff
--- a/rhodecode/controllers/home.py	Thu Oct 18 20:16:00 2012 +0200
+++ b/rhodecode/controllers/home.py	Thu Oct 18 20:54:25 2012 +0200
@@ -70,6 +70,8 @@
                 template.get_def("repo_name")
                 .render(name, rtype, private, fork_of, short_name=False,
                         admin=False, _=_, h=h, c=c))
+            last_change = lambda last_change:  (template.get_def("last_change")
+                                           .render(last_change, _=_, h=h, c=c))
             rss_lnk = lambda repo_name: (template.get_def("rss")
                                            .render(repo_name, _=_, h=h, c=c))
             atom_lnk = lambda repo_name: (template.get_def("atom")
@@ -81,7 +83,7 @@
                     "raw_name": repo.repo_name.lower(),
                     "name": repo_lnk(repo.repo_name, repo.repo_type,
                                      repo.private, repo.fork),
-                    "last_change": h.age(repo.last_db_change),
+                    "last_change": last_change(repo.last_db_change),
                     "desc": repo.description,
                     "owner": h.person(repo.user.username),
                     "rss": rss_lnk(repo.repo_name),