Resolve tabbing/indentation issues

This commit is contained in:
decentral1se
2021-04-07 17:18:09 +02:00
parent 44153bc562
commit 5c13b626a8
3 changed files with 37 additions and 36 deletions

View File

@ -1,21 +1,21 @@
import ecdsa
from ecdsa import SigningKey
from base64 import urlsafe_b64encode
import ecdsa
from django.core.management.base import BaseCommand
from djangoldp_webpushnotification.models import VAPIDKeyset
from ecdsa import SigningKey
class Command(BaseCommand):
help = "Generate VAPID key pair"
help = "Generate VAPID key pair"
def handle(self, *args, **options):
priv_key = SigningKey.generate(curve=ecdsa.NIST256p)
def handle(self, *args, **options):
priv_key = SigningKey.generate(curve=ecdsa.NIST256p)
VAPIDKeyset.objects.create(
private_key=urlsafe_b64encode(priv_key.to_string()).strip(b"=")
)
VAPIDKeyset.objects.create(
private_key=urlsafe_b64encode(priv_key.to_string()).strip(b"=")
)
self.stdout.write("VAPID Keyset succesfully generated")
self.stdout.write("VAPID Keyset succesfully generated")
exit(0)
exit(0)