Skip to content

Commit

Permalink
upgrade to django2.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopetree committed Oct 9, 2019
1 parent 6c62731 commit 1c048df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
14 changes: 2 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
FROM python:3.6-alpine
ARG yum_repo=https://mirrors.aliyun.com/
FROM python:3.6
ARG pip_url=http://pypi.douban.com/simple
ARG pip_host=pypi.douban.com
ARG work_home=/opt/cloud/izone
ENV PYTHONUNBUFFERED=1

# change repositories to aliyun and set timezone to Shanghai
RUN cp -a /etc/apk/repositories /etc/apk/repositories.bak \
&& sed -i "s@http://dl-cdn.alpinelinux.org/@${yum_repo}@g" /etc/apk/repositories \
&& apk add --no-cache --virtual .build-deps \
jpeg-dev \
zlib-dev \
gcc \
python3-dev \
libc-dev \
tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

RUN mkdir -p ${work_home}
WORKDIR ${work_home}
Expand Down
4 changes: 0 additions & 4 deletions izone/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
import os
import sys

# 更换默认的数据库连接
import pymysql

pymysql.install_as_MySQLdb()
# 导入网站个人信息,非通用信息

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ bootstrap-admin==0.4.3
certifi==2019.9.11
chardet==3.0.4
defusedxml==0.6.0
Django==2.1.4
Django==2.2.6
django-allauth==0.40.0
django-appconf==1.0.3
django-crispy-forms==1.7.2
Expand All @@ -17,6 +17,7 @@ html5lib==1.0.1
idna==2.8
jieba==0.39
Markdown==3.1.1
mysqlclient==1.4.4
oauthlib==3.1.0
olefile==0.46
pilkit==2.0
Expand Down

0 comments on commit 1c048df

Please sign in to comment.