apk上传更新功能3
This commit is contained in:
parent
b258ee330c
commit
9433459f24
|
@ -1,11 +1,9 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from apps.am.models import Area
|
from apps.am.models import Area
|
||||||
from apps.hrm.models import Employee
|
from apps.hrm.models import Employee
|
||||||
from apps.utils.constants import Algo
|
|
||||||
from apps.utils.models import BaseModel, CommonADModel, CommonAModel, CommonBModel
|
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 apps.third.models import TDevice
|
||||||
from django.utils import timezone
|
|
||||||
# Create your models here.
|
# Create your models here.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -602,7 +602,7 @@ class ApkView(MyLoggingMixin, ListCreateAPIView):
|
||||||
config.write(open(os.path.join(settings.BASE_DIR, 'server/conf.ini'), 'w'))
|
config.write(open(os.path.join(settings.BASE_DIR, 'server/conf.ini'), 'w'))
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
try:
|
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:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
return Response()
|
return Response()
|
||||||
|
|
Loading…
Reference in New Issue