예제 #1
0
 def handle(self, *args, **options):
     for one_user  in User.objects.all():
         if not  one_user.is_staff and one_user.is_active:
             Key1 = generate_key()
             Key2 = generate_key()
             PrivateKey = generate_key_from(Key1, one_user.email)
             new_obj = ApiKeys(public_key = Key2, private_key = PrivateKey, user = one_user)
             new_obj.save()
예제 #2
0
파일: views.py 프로젝트: kostyll/stock2
def new_api_key(one_user):
    Key1 = generate_key()
    Key2 = generate_key()
    PrivateKey = generate_key_from(Key1, one_user.email)
    new_obj = ApiKeys(public_key=Key2, private_key=PrivateKey, user=one_user)
    new_obj.save()
예제 #3
0
파일: views.py 프로젝트: perldev/processing
def new_api_key(one_user):
    Key1 = generate_key()
    Key2 = generate_key()
    PrivateKey = generate_key_from(Key1, one_user.email)
    new_obj = ApiKeys(public_key=Key2, private_key=PrivateKey, user=one_user)
    new_obj.save()