Пример #1
0
 def __init__(self, *args, **kwargs):
     super(GPGForm, self).__init__(*args, **kwargs)
     system_key = gpgutils.get_default_gpg_key(gpgutils.get_gpg_key_list())
     self.fields['key'] = forms.ChoiceField(
         choices=get_gpg_key_choices(), initial=system_key['fingerprint'])
Пример #2
0
def key_list(request):
    """List all of the GPG keys that the SS knows about."""
    keys = gpgutils.get_gpg_key_list()
    return render(request, "administration/key_list.html", locals())
Пример #3
0
def get_gpg_key_choices():
    return [(key['fingerprint'], ', '.join(key['uids']))
            for key in gpgutils.get_gpg_key_list()]
def get_gpg_key_choices():
    return [
        (key["fingerprint"], ", ".join(key["uids"]))
        for key in gpgutils.get_gpg_key_list()
    ]