コード例 #1
0
ファイル: results.py プロジェクト: Kentzo/BZD-tests
 def show(self, id):
     attempt = Session.query(Attempt).get(int(id))
     if attempt and attempt.is_attempted:
         c.attempt = attempt
         return render('/admin/results/show.html')
     else:
         redirect(url(controller='results', action='index'))
コード例 #2
0
 def show(self, id):
     attempt = Session.query(Attempt).get(int(id))
     if attempt and attempt.is_attempted:
         c.attempt = attempt
         return render('/admin/results/show.html')
     else:
         redirect(url(controller='results', action='index'))
コード例 #3
0
 def test(self, id):
     attempt = Session.query(Attempt).get(int(id))
     if attempt and not attempt.is_attempted:
         c.attempt_id = attempt.id
         c.test = json.loads(attempt.test)
         return render('/attempt/test.html')
     else:
         redirect(url(controller='attempt', action='index'))
コード例 #4
0
ファイル: account.py プロジェクト: Kentzo/BZD-tests
 def login(self):
     """
     This is where the login form should be rendered.
     Without the login counter, we won't be able to tell if the user has
     tried to log in with wrong credentials
     """
     identity = request.environ.get('repoze.who.identity')
     came_from = str(request.GET.get('came_from', '')) or url(controller='tests', action='index')
     if identity:
         redirect(url(came_from))
     else:
         c.came_from = came_from
         c.login_counter = request.environ['repoze.who.logins'] + 1
         return render('/admin/account/login.html')
コード例 #5
0
 def index(self):
     c.message = request.params.get('message')
     if not hasattr(c, 'message'):
         c.message = u""
     c.tests = Session.query(TestSuite).all()
     return render('/attempt/index.html')
コード例 #6
0
ファイル: account.py プロジェクト: Kentzo/BZD-tests
 def change_password(self):
     return render('/admin/account/change_password.html')
コード例 #7
0
ファイル: results.py プロジェクト: Kentzo/BZD-tests
 def index(self):
     c.attempts = Session.query(Attempt).order_by(desc(Attempt.date)).all()
     return render('/admin/results/index.html')
コード例 #8
0
 def index(self):
     c.attempts = Session.query(Attempt).order_by(desc(Attempt.date)).all()
     return render('/admin/results/index.html')