REM @echo off SET PYTHON=python SET VENV_NAME=venv_py35_pyros SET USERNAME=root SET DB_USER=pyros SET DB_PASSWORD=DjangoPyros SET MYSQL=0 SET PORT=8000 REM String variables SET ASK_USE_MYSQL=-Do you wish to use mysql in your project ? Only if mysql-server is installed. (Y/N) SET ASK_MYSQL_USERNAME=-MySQL server login (default 'root'): SET SQL_SCRIPT=CREATE DATABASE IF NOT EXISTS pyros; DROP USER IF EXISTS '%DB_USER%'; CREATE USER '%DB_USER%' IDENTIFIED BY '%DB_PASSWORD%'; GRANT ALL PRIVILEGES ON pyros.* TO %DB_USER%; SET SQL_FAIL=-Failed to execute database script, probably due to a wrong username or password SET TELL_MYSQL_CREATIONS=-Created pyros database.\n-Created new user '%DB_USER%' with password '%DB_PASSWORD%' SET USE_SQLITE=-Sqlite will be used by default. There is no required configuration. SET PRIVATE_DIR_CREATE=-Created 'private' directory SET PYTHON_NOT_INSTALLED=-Cannot find %PYTHON%, please install it or configure PYTHON variable in this script SET PYTHON_FOUND=-Found %PYTHON% at SET VENV_CREATE=-Creating virtualenv $VENV_NAME... SET VENV_ACTIVATE=-Activating virtual environment... SET VENV_FAIL=-Failed to activate virtualenv. Ask project administrators for further information SET DONE=done. SET UPGRADE_PIP=-Upgrading pip: SET UPGRADE_WHEEL=-Upgrading wheel: SET INSTALL_PACKAGES=-Installing required packages from install/REQUIREMENTS.txt SET CREATE_DATABASE_CONTENT=-Creating database tables : SET CREATE_SUPERUSER=-Creating database superuser : SET CREATE_SUPERUSER_SCRIPT=from django.contrib.auth.models import User; User.objects.filter(username='%DB_USER%').delete(); User.objects.create_superuser('%DB_USER%', 'admin@example.com', '%DB_PASSWORD%') SET INSTALLATION_FINISHED=-Installation finished SET BAD_SQL_CONFIGURATION=-Migration cannot be applied to the database : check your database configuration, or use sqlite instead SET TELL_SUPERUSER_CREATION=-Superuser created for django admin interface. Login: %DB_USER% , password: %DB_PASSWORD% SET FINAL_MESSAGE=-Please run './pyrosrun server' then go to localhost:%PORT%/admin and log in with these id REM Getting python location where %PYTHON% > tmp.txt IF %ERRORLEVEL% NEQ 0 ( ECHO %PYTHON_NOT_INSTALLED% del tmp.txt PAUSE EXIT ) SET /p PYTHON_DIR=