Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/h/e/helios-HEAD/helios/views.py   helios(Download)
def election_params(request):
  return ELGAMAL_PARAMS.toJSONDict()
 
def election_verifier(request):
  return render_template(request, "tally_verifier")
def election_keygenerator(request):
  """
  A key generator with the current params, like the trustee home but without a specific election.
  """
  eg_params_json = utils.to_json(ELGAMAL_PARAMS.toJSONDict())
def election_new_2(request):
  return render_template(request, "election_new_2", {'eg_params_json' : utils.to_json(ELGAMAL_PARAMS.toJSONDict()),
                                                    'name': request.GET['name'], 'election_type': request.GET['election_type']})
 
@login_required
def trustee_home(request, election, trustee_email):
  eg_params_json = utils.to_json(ELGAMAL_PARAMS.toJSONDict())
  keyshare = KeyShare.objects.get(election=election, email=trustee_email)
  return render_template(request, "trustee_home", {'election': election, 'keyshare': keyshare, 'eg_params_json': eg_params_json})
 

src/h/e/helios-HEAD/controllers/election.py   helios(Download)
  def home(self, keyshare):
    eg_params_json = utils.to_json(ELGAMAL_PARAMS.toJSONDict())
    election = self.parent
    return self.render("home")
 
  def params(self, **kw):
    """
    The crypto params for keys
    """
    return ELGAMAL_PARAMS.toJSONDict()
    user = Controller.user()
 
    eg_params_json = utils.to_json(ELGAMAL_PARAMS.toJSONDict())
    return self.render('new_2')