From a38faa33be8f93229d5dd4db8b2fa4dd78137ccc Mon Sep 17 00:00:00 2001 From: Edvinas Date: Tue, 15 Sep 2015 10:33:34 -0400 Subject: [PATCH 1/2] 1. virtualenv package added 2. make ubuntu added 3. make postgresql addedw --- Makefile | 12 ++++++++++-- README.rst | 9 ++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 5a5b9ad..511d4d0 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,17 @@ help: ubuntu: sudo apt-get update sudo apt-get -y build-dep python-psycopg2 - sudo apt-get -y install build-essential python-dev exuberant-ctags + sudo apt-get -y install build-essential python-dev exuberant-ctags virtualenv -run: bin/django ; bin/django runserver +postgresql: + sudo apt-get install postgresql + @read -p "Enter postgresql database role name ():" dbrole; \ + sudo -u postgres psql -c "CREATE ROLE $$dbrole"; \ + sudo -u postgres psql -c "ALTER ROLE $$dbrole with superuser"; \ + sudo -u postgres psql -c "ALTER ROLE $$dbrole with login"; \ + createdb pylab2 + +run: bin/django ; bin/django runserver 0.0.0.0:8000 test: bin/django ; bin/django test --settings=pylab.settings.testing --nologcapture diff --git a/README.rst b/README.rst index 252cc01..5145f87 100644 --- a/README.rst +++ b/README.rst @@ -24,13 +24,8 @@ Development environment You need Ubuntu 14.04 or greater. In Ubuntu terminal execute these commands:: - $ sudo apt-get install python-dev python3-dev - $ sudo apt-get install postgresql - $ sudo -u postgres psql - # create role ; - # alter role with superuser; - # alter role with login; - $ createdb pylab # Creates Postgresql database with name ``pylab`` + $ make ubuntu + $ make postgresql $ make # Downloads and configures python packages $ bin/django migrate # Creates tables in the database $ make testall # Checks if everything works properly From cd9451d3e51cdd2663786bfc73dbb207a219b440 Mon Sep 17 00:00:00 2001 From: Edvinas Date: Tue, 15 Sep 2015 10:33:34 -0400 Subject: [PATCH 2/2] 1. virtualenv package added 2. make ubuntu added 3. make postgresql added --- Makefile | 12 ++++++++++-- README.rst | 9 ++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 5a5b9ad..4a76730 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,17 @@ help: ubuntu: sudo apt-get update sudo apt-get -y build-dep python-psycopg2 - sudo apt-get -y install build-essential python-dev exuberant-ctags + sudo apt-get -y install build-essential python-dev exuberant-ctags virtualenv -run: bin/django ; bin/django runserver +postgresql: + sudo apt-get install postgresql + @read -p "Enter postgresql database role name ():" dbrole; \ + sudo -u postgres psql -c "CREATE ROLE $$dbrole"; \ + sudo -u postgres psql -c "ALTER ROLE $$dbrole with superuser"; \ + sudo -u postgres psql -c "ALTER ROLE $$dbrole with login"; \ + createdb pylab + +run: bin/django ; bin/django runserver 0.0.0.0:8000 test: bin/django ; bin/django test --settings=pylab.settings.testing --nologcapture diff --git a/README.rst b/README.rst index 252cc01..5145f87 100644 --- a/README.rst +++ b/README.rst @@ -24,13 +24,8 @@ Development environment You need Ubuntu 14.04 or greater. In Ubuntu terminal execute these commands:: - $ sudo apt-get install python-dev python3-dev - $ sudo apt-get install postgresql - $ sudo -u postgres psql - # create role ; - # alter role with superuser; - # alter role with login; - $ createdb pylab # Creates Postgresql database with name ``pylab`` + $ make ubuntu + $ make postgresql $ make # Downloads and configures python packages $ bin/django migrate # Creates tables in the database $ make testall # Checks if everything works properly