Esempio n. 1
0
 def test_get(self):
     self.assertEqual(check_data_writable(), [])
     # This will generate new key
     key = get_gpg_sign_key()
     self.assertIsNotNone(key)
     # Check cache access
     self.assertEqual(key, get_gpg_sign_key())
     # Check empty cache
     cache.delete('gpg-key-id')
     self.assertEqual(key, get_gpg_sign_key())
Esempio n. 2
0
 def test_get(self):
     self.assertEqual(check_data_writable(), [])
     # This will generate new key
     key = get_gpg_sign_key()
     self.assertIsNotNone(key)
     # Check cache access
     self.assertEqual(key, get_gpg_sign_key())
     # Check empty cache
     cache.delete('gpg-key-id')
     self.assertEqual(key, get_gpg_sign_key())
Esempio n. 3
0
 def page_context(self, context):
     context.update({
         'title': _('Weblate keys'),
         'gpg_key_id': get_gpg_sign_key(),
         'gpg_key': get_gpg_public_key(),
         'ssh_key': get_key_data(),
         'allow_index': True,
     })
Esempio n. 4
0
 def page_context(self, context):
     context.update({
         'title': _('Weblate keys'),
         'gpg_key_id': get_gpg_sign_key(),
         'gpg_key': get_gpg_public_key(),
         'ssh_key': get_key_data(),
         'allow_index': True,
     })
Esempio n. 5
0
 def page_context(self, context):
     context.update({
         "title": _("Weblate keys"),
         "gpg_key_id": get_gpg_sign_key(),
         "gpg_key": get_gpg_public_key(),
         "ssh_key": get_key_data(),
         "allow_index": True,
     })
Esempio n. 6
0
def keys(request):
    """Show keys information."""
    return render(
        request, 'keys.html', {
            'title': _('Weblate keys'),
            'gpg_key_id': get_gpg_sign_key(),
            'gpg_key': get_gpg_public_key(),
            'ssh_key': get_key_data(),
            'allow_index': True,
        })
Esempio n. 7
0
def about(request):
    """Show about page with version information."""
    return render(
        request, 'about.html', {
            'title': _('About Weblate'),
            'versions': get_versions() + get_optional_versions(),
            'allow_index': True,
            'gpg_key_id': get_gpg_sign_key(),
            'gpg_key': get_gpg_public_key(),
        })
Esempio n. 8
0
def about(request):
    """Show about page with version information."""
    return render(
        request,
        'about.html',
        {
            'title': _('About Weblate'),
            'versions': get_versions() + get_optional_versions(),
            'allow_index': True,
            'gpg_key_id': get_gpg_sign_key(),
            'gpg_key': get_gpg_public_key(),
        }
    )
Esempio n. 9
0
 def get_gpg_sign_args():
     sign_key = get_gpg_sign_key()
     if sign_key:
         return ["--gpg-sign={}".format(sign_key)]
     return []
Esempio n. 10
0
 def _get_gpg_sign():
     sign_key = get_gpg_sign_key()
     if sign_key:
         return ['--gpg-sign={}'.format(sign_key)]
     return []
Esempio n. 11
0
File: git.py Progetto: nijel/weblate
 def get_gpg_sign_args():
     sign_key = get_gpg_sign_key()
     if sign_key:
         return [f"--gpg-sign={sign_key}"]
     return []
Esempio n. 12
0
 def _get_gpg_sign():
     sign_key = get_gpg_sign_key()
     if sign_key:
         return ['--gpg-sign={}'.format(sign_key)]
     return []