# Make it a function, so that it works with `source`
start_project() {
-local DJANGO_REQ='Django>=1.7,<1.8'
+local DJANGO_REQ='Django>=1.8,<1.9'
local DJANGO_ROOT='src'
local PYPI='https://py.mdrn.pl:8443/simple'
local DEFAULT_PYTHON="`which python3.4`"
if [[ "$FNP_PROJECT_TEMPLATE" =~ ^(https?|ftp):// ]]; then
local PROJECT_TMPDIR=`mktemp -d fnp-django-template-XXX`
curl "$FNP_PROJECT_TEMPLATE" | tar xzf - -C "$PROJECT_TMPDIR"
- local TEMPLATE="$PROJECT_TMPDIR"/fnp-django-template-*/src
+ local TEMPLATE=("$PROJECT_TMPDIR"/fnp-django-template-*/src)
else
local TEMPLATE="$FNP_PROJECT_TEMPLATE"
fi
chmod +x "$DJANGO_ROOT"/manage.py
mv _gitignore .gitignore
+cp etc/local_settings.py.sample etc/local_settings.py
+cp etc/local_settings_test.py.sample etc/local_settings_test.py
+ln -s ../../../etc/local_settings.py ../../../etc/local_settings_test.py $DJANGO_ROOT/$PROJECT/settings/
echo -e "${strong}Installing requirements...${normal}"
-pip install -i "$PYPI" -r requirements.txt
-echo -e "${strong}Installing developer requirements...${normal}"
-pip install -i "$PYPI" -r requirements-dev.txt
-echo -e "${strong}Running syncdb...${normal}"
-"$DJANGO_ROOT"/manage.py syncdb --noinput
+pip install -i "$PYPI" -r requirements/dev.txt
+echo -e "${strong}Running migrate...${normal}"
+"$DJANGO_ROOT"/manage.py migrate #--noinput
echo -e "${strong}Starting new git repository...${normal}"
git init