changeset 75:99afa4d28e2b

Changed order of user actions log
author Marcin Kuzminski <marcin@python-blog.com>
date Tue, 13 Apr 2010 22:30:52 +0200
parents cdf4fda66dd9
children 71401840ed86
files pylons_app/controllers/admin.py pylons_app/templates/admin.html
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pylons_app/controllers/admin.py	Mon Apr 12 10:29:18 2010 +0200
+++ b/pylons_app/controllers/admin.py	Tue Apr 13 22:30:52 2010 +0200
@@ -53,7 +53,8 @@
                 )
         if c.admin_user:
             sa = meta.Session
-            c.users_log = sa.query(UserLogs).limit(10).all()
+            c.users_log = sa.query(UserLogs)\
+                .order_by(UserLogs.action_date.desc()).limit(10).all()
         return render('/admin.html')
 
     def hgrc(self, dirname):
--- a/pylons_app/templates/admin.html	Mon Apr 12 10:29:18 2010 +0200
+++ b/pylons_app/templates/admin.html	Tue Apr 13 22:30:52 2010 +0200
@@ -34,7 +34,7 @@
     <br/>
     <div>
         <h2>Welcome ${c.admin_username}</h2>
-        <div>Last 5 user actions</div>
+        <div>${_('Last 10 user actions')</div>
         %if c.users_log:
 	        <table>
 	        <tr>