Resolve tabbing/indentation issues
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user