Commit c7e1e67a authored by Daniel Tschan's avatar Daniel Tschan

Use actual Django configuration for admin password generation to keep pep8 happy.

parent 0acce108
...@@ -100,7 +100,7 @@ sh "python ${OPENSHIFT_REPO_DIR}/openshift/manage.py collectstatic --noinput" ...@@ -100,7 +100,7 @@ sh "python ${OPENSHIFT_REPO_DIR}/openshift/manage.py collectstatic --noinput"
if [ ! -s $OPENSHIFT_DATA_DIR/.credentials ]; then if [ ! -s $OPENSHIFT_DATA_DIR/.credentials ]; then
echo "Generating Weblate admin credentials and writing them to ${OPENSHIFT_DATA_DIR}/.credentials" echo "Generating Weblate admin credentials and writing them to ${OPENSHIFT_DATA_DIR}/.credentials"
sh "python ${OPENSHIFT_REPO_DIR}/openshift/manage.py createadmin" sh "python ${OPENSHIFT_REPO_DIR}/openshift/manage.py createadmin"
sh "python ${OPENSHIFT_REPO_DIR}/openshift/secure_db.py | tee ${OPENSHIFT_DATA_DIR}/.credentials" DJANGO_SETTINGS_MODULE='weblate.settings_openshift' sh "python ${OPENSHIFT_REPO_DIR}/openshift/secure_db.py | tee ${OPENSHIFT_DATA_DIR}/.credentials"
fi fi
if find_script_dir; then if find_script_dir; then
......
...@@ -19,11 +19,6 @@ ...@@ -19,11 +19,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
from django.conf import settings
# Django must be configured before imports, or some will fail with ImproperlyConfigured exception.
settings.configure()
import os import os
import sqlite3 import sqlite3
from openshift.openshiftlibs import make_secure_key, get_openshift_secret_token from openshift.openshiftlibs import make_secure_key, get_openshift_secret_token
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment