Reputation: 969
I am trying to write an install script for my project which requires Django. I am using pip to install a list of apps but when it gets to Django it says
You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now?
I need this script to be autonomous.
Is there away to automatically answer this question or ignore it and set the superusers later?
My basic bash script looks something like this
#!/bin/bash
set -eux
#==================================================#
# These should be just the server requirements only
# !! Exception being scipy for now. pip install not
# working
#==================================================#
apt-get install -y python postgresql-9.1 apache2 python-setuptools postgresql-server-dev-9.1 postgresql-9.1-postgis postgis python-scipy binutils libproj-dev gdal-bin git
#==================================================#
# setup the posgis template for postgresql
#==================================================#
GEOGRAPHY=0
POSTGIS_SQL=postgis.sql
BLAH BLAH !!!
Lots of database set up code here
#==================================================#
# Setup the python environment
#==================================================#
easy_install virtualenv
easy_install virtualenvwrapper
easy_install pip
#==================================================#
# Pull the catami code from git and install
#==================================================#
mkdir -p /home/catami
mkdir -p /home/catami/catamiportal
cd /home/catami/catamiportal
git clone https://github.com/catami/catami.git
cd catami
pip install -r requirements.txt
python manage.py syncdb
manage.py runserver 0.0.0.0:8000
I am getting grief from installing django from the requirements file.
Upvotes: 0
Views: 681
Reputation: 969
My mistake. it is the syncdb command that is asking the question not the install.
The solution is
python manage.py syncdb --noinput
Upvotes: 1