format code

super_sign_new
youngS 4 years ago
parent a0dba04bf2
commit 9f178f5c7f
  1. 1
      fir_ser/api/migrations/0008_auto_20200922_1951.py
  2. 1
      fir_ser/api/migrations/0009_auto_20200925_2041.py
  3. 1
      fir_ser/api/migrations/0010_userinfo_api_token.py
  4. 2
      fir_ser/api/models.py
  5. 3
      fir_ser/api/urls.py
  6. 2
      fir_ser/api/utils/app/supersignutils.py
  7. 3
      fir_ser/api/views/__init__.py
  8. 6
      fir_ser/cli.py
  9. 1
      fir_ser/cli/views/login.py
  10. 6
      fir_ser/fir_ser/settings.py

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0007_auto_20200520_1153'),
]

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0008_auto_20200922_1951'),
]

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0009_auto_20200925_2041'),
]

@ -58,7 +58,7 @@ class UserInfo(AbstractUser):
if len(self.uid) < 8:
self.uid = make_random_uuid()
if len(self.api_token) < 8:
self.api_token = self.uid+generateAlphanumericTokenOfLength(64)
self.api_token = self.uid + generateAlphanumericTokenOfLength(64)
super(UserInfo, self).save(*args, **kwargs)

@ -15,7 +15,8 @@ Including another URLconf
"""
from django.urls import path, re_path, include
from api.views.login import LoginView, UserInfoView, RegistView, AuthorizationView, ChangeAuthorizationView, UserApiTokenView
from api.views.login import LoginView, UserInfoView, RegistView, AuthorizationView, ChangeAuthorizationView, \
UserApiTokenView
from api.views.logout import LogoutView
from api.views.apps import AppsView, AppInfoView, AppReleaseinfoView
from api.views.download import ShortDownloadView

@ -241,7 +241,7 @@ class IosUtils(object):
self.developer_obj.save()
send_ios_developer_active_status(self.developer_obj,
'app %s developer %s sign failed %s. disable this developer' % (
self.app_obj, self.developer_obj, result))
self.app_obj, self.developer_obj, result))
self.get_developer_auth()
self.resign()
return

@ -4,9 +4,10 @@
# author: liuyu
# date: 2020/10/12
import logging
logger = logging.getLogger(__file__)
try:
from api.utils.crontab import run
except Exception as e:
logger.error("import crontab.run failed Exception:%s" % (e))
logger.error("import crontab.run failed Exception:%s" % (e))

@ -33,7 +33,6 @@ def upload_qiniuyunoss(key, token, file_path):
raise AssertionError(info.text)
class FLY_CLI_SER(object):
def __init__(self, fly_cli_domain, fly_cli_token):
@ -44,7 +43,7 @@ class FLY_CLI_SER(object):
"APIAUTHORIZATION": fly_cli_token
}
def get_upload_token(self, bundleid, type):
def get_upload_token(self, bundleid, type):
url = '%s/api/v2/fir/server/analyse' % self.fly_cli_domain
data = {"bundleid": bundleid, "type": type}
req = requests.post(url, json=data, headers=self._header)
@ -63,7 +62,6 @@ class FLY_CLI_SER(object):
return
raise AssertionError(req.text)
def upload_local_storage(self, upload_key, upload_token, app_id, file_path):
url = '%s/api/v2/fir/server/upload' % self.fly_cli_domain
m = MultipartEncoder(fields={
@ -87,7 +85,6 @@ class FLY_CLI_SER(object):
return
raise AssertionError(req.text)
def upload_app(self, app_path):
appobj = AppInfo(app_path)
appinfo = appobj.get_app_data()
@ -264,4 +261,3 @@ if __name__ == '__main__':
if os.path.isfile(app_path):
fly_obj.upload_app(app_path)
raise FileNotFoundError(app_path)

@ -22,4 +22,3 @@ logger = logging.getLogger(__name__)
class CliUserInfoView(UserInfoView):
authentication_classes = [ApiTokenAuthentication, ]

@ -24,7 +24,7 @@ SECRET_KEY = 'j!g@^bc(z(a3*i&kp$_@bgb)bug&^#3=amch!3lz&1x&s6ss6t'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ['127.0.0.1','synchrotron']
ALLOWED_HOSTS = ['127.0.0.1', 'synchrotron']
# Application definition
@ -171,7 +171,7 @@ REST_FRAMEWORK_EXTENSIONS = {
# 注册方式,如果启用sms或者email 需要配置 THIRD_PART_CONFIG.sender 信息
REGISTER = {
"enable": True,
"captcha": True, # 是否开启注册字母验证码
"captcha": True, # 是否开启注册字母验证码
"register_type": {
'sms': False, # 短信注册
'email': True, # 邮件注册
@ -181,7 +181,7 @@ REGISTER = {
# 信息修改也会使用该配置
LOGIN = {
"captcha": True, # 是否开启登录字母验证码
"captcha": True, # 是否开启登录字母验证码
"login_type": {
'sms': True, # 短信登录
'email': True, # 邮件登录

Loading…
Cancel
Save