-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathinstall.sh
More file actions
23 lines (18 loc) · 740 Bytes
/
install.sh
File metadata and controls
23 lines (18 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
echo "Install Django "
version=$(python -V 2>&1 | grep -Po '(?<=Python )(.)')
if [ "$version" -lt 3 ]; then pip install 'django>=1.11,<2.0' ; else pip install 'django>=2.0'; fi
echo "Startproject"
django-admin startproject --template https://github.com/Alex-CodeLab/django-base-template/zipball/master --extension py,md,rst config && \
mv config/ src && \
echo "Install requirements" && \
cd src && \
pip install -r requirements/local.txt && \
cp config/settings/local-dist.py config/settings/local.py && \
echo "Install completed. Create Database" && \
chmod +x manage.py && \
./manage.py makemigrations && \
./manage.py migrate && \
./manage.py createsuperuser && \
./manage.py collectstatic && \
./manage.py runserver