##// END OF EJS Templates
Added lastlogin to user after login, model db update
Added lastlogin to user after login, model db update

File last commit:

r235:fcab58c4 default
r242:5da4ef11 default
Show More
admin.py
31 lines | 1.1 KiB | text/x-python | PythonLexer
changed for pylons 0.1 / 1.0...
r43 import logging
from pylons import request, response, session, tmpl_context as c, url, app_globals as g
from pylons.controllers.util import abort, redirect
from pylons_app.lib.base import BaseController, render
Marcin Kuzminski
Updated admin to show last 5 actions + updated db model
r62 from pylons_app.model import meta
changed naming convention for db modules.
r234 from pylons_app.model.db import UserLog
Marcin Kuzminski
Implemented paging to admin user acion log
r78 from webhelpers.paginate import Page
Authenticated controller with LoginRequired decorator, and cleaned __before__ (used in baseController now). fixed User for clone url with logged in session user....
r191 from pylons_app.lib.auth import LoginRequired
moved cache invalidating to utils, as seperate function. Implemented invalidating in
r140
changed for pylons 0.1 / 1.0...
r43 log = logging.getLogger(__name__)
class AdminController(BaseController):
Authenticated controller with LoginRequired decorator, and cleaned __before__ (used in baseController now). fixed User for clone url with logged in session user....
r191
@LoginRequired()
changed for pylons 0.1 / 1.0...
r43 def __before__(self):
Authenticated controller with LoginRequired decorator, and cleaned __before__ (used in baseController now). fixed User for clone url with logged in session user....
r191 user = session['hg_app_user']
c.admin_user = user.is_admin
c.admin_username = user.username
super(AdminController, self).__before__()
changed for pylons 0.1 / 1.0...
r43
def index(self):
Authenticated controller with LoginRequired decorator, and cleaned __before__ (used in baseController now). fixed User for clone url with logged in session user....
r191 sa = meta.Session
changed naming convention for db modules.
r234 users_log = sa.query(UserLog).order_by(UserLog.action_date.desc())
Authenticated controller with LoginRequired decorator, and cleaned __before__ (used in baseController now). fixed User for clone url with logged in session user....
r191 p = int(request.params.get('page', 1))
c.users_log = Page(users_log, page=p, items_per_page=10)
c.log_data = render('admin/admin_log.html')
if request.params.get('partial'):
return c.log_data
Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
r216 return render('admin/admin.html')
Changed creation of repository to vcs implementation,...
r133