fix py3 local_settings
This commit is contained in:
parent
6acc7ec5f4
commit
74c4d718ab
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
# Django settings for pan.do/ra project defaults,
|
# Django settings for pan.do/ra project defaults,
|
||||||
# create local_settings.py to overwrite
|
# create local_settings.py to overwrite
|
||||||
# check pan.do/ra section below for relevant settings
|
# check pan.do/ra section below for relevant settings
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from os.path import join, normpath, dirname
|
from os.path import join, normpath, dirname
|
||||||
|
@ -255,7 +256,7 @@ except NameError:
|
||||||
from django.utils.crypto import get_random_string
|
from django.utils.crypto import get_random_string
|
||||||
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
|
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
|
||||||
SECRET_KEY = get_random_string(50, chars)
|
SECRET_KEY = get_random_string(50, chars)
|
||||||
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:
|
||||||
|
|
Loading…
Reference in a new issue