Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<unix_username>):" 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

Expand Down
9 changes: 2 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <unix_username>;
# alter role <unix_username> with superuser;
# alter role <unix_username> 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
Expand Down