expect django greater than 2, and use open() instead of file() call

This commit is contained in:
jeffrey forman 2019-02-14 07:51:31 -05:00
parent 48b1054810
commit e7e560a403
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ language: python
python: python:
- "3.6" - "3.6"
env: env:
- DJANGO="Django>=2" - DJANGO="Django>2.1"
install: install:
- pip install -q $DJANGO - pip install -q $DJANGO
- pip install -r requirements.txt - pip install -r requirements.txt

View File

@ -70,7 +70,7 @@ except IOError:
try: try:
from random import choice from random import choice
SECRET_KEY = ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]) SECRET_KEY = ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)])
secret = file(SECRET_FILE, 'w') secret = open(SECRET_FILE, 'w')
secret.write(SECRET_KEY) secret.write(SECRET_KEY)
secret.close() secret.close()
except IOError: except IOError: