apk上传更新功能3

This commit is contained in:
曹前明 2022-08-08 11:16:55 +08:00
parent b258ee330c
commit 9433459f24
2 changed files with 2 additions and 4 deletions

View File

@ -1,11 +1,9 @@
from django.db import models
from apps.am.models import Area
from apps.hrm.models import Employee
from apps.utils.constants import Algo
from apps.utils.models import BaseModel, CommonADModel, CommonAModel, CommonBModel
from apps.system.models import Dept, File, Post, User
from apps.system.models import Post, User
from apps.third.models import TDevice
from django.utils import timezone
# Create your models here.

View File

@ -602,7 +602,7 @@ class ApkView(MyLoggingMixin, ListCreateAPIView):
config.write(open(os.path.join(settings.BASE_DIR, 'server/conf.ini'), 'w'))
from shutil import copyfile
try:
copyfile(settings.BASE_DIR + vdata['file'], settings.BASE_DIR + '/media/qyjy_ehs.apk')
copyfile(settings.BASE_DIR + vdata['file'], settings.BASE_DIR + '/media/zc_ehs.apk')
except Exception:
pass
return Response()