1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-03-22 10:34:49 +00:00

black and isort lint.

This commit is contained in:
catborise 2020-11-04 15:54:50 +03:00
parent 77d031b04f
commit 7aaa018d2c
47 changed files with 1206 additions and 1063 deletions

View file

@ -8,7 +8,7 @@ def apply_change_password(sender, **kwargs):
Depending on settings SHOW_PROFILE_EDIT_PASSWORD
'''
from django.conf import settings
from django.contrib.auth.models import User, Permission
from django.contrib.auth.models import Permission, User
if hasattr(settings, 'SHOW_PROFILE_EDIT_PASSWORD'):
print('\033[1m! \033[92mSHOW_PROFILE_EDIT_PASSWORD is found inside settings.py\033[0m')
print('\033[1m* \033[92mApplying permission can_change_password for all users\033[0m')
@ -29,8 +29,8 @@ def create_admin(sender, **kwargs):
'''
Create initial admin user
'''
from django.contrib.auth.models import User
from accounts.models import UserAttributes
from django.contrib.auth.models import User
plan = kwargs.get('plan', [])
for migration, rolled_back in plan:

View file

@ -1,10 +1,12 @@
# Generated by Django 2.2.10 on 2020-01-28 07:01
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):

View file

@ -1,7 +1,8 @@
from django import template
import base64
import hashlib
from django import template
register = template.Library()

View file

@ -41,7 +41,7 @@ def validate_ssh_key(key):
# data[4:str_len] must have string which matches with the typeofkey, another ssh key property.
if data[4 : 4 + str_len] == typeofkey:
return True
else:
else:
return False