Skip to content
Snippets Groups Projects
Commit 34698032 authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

Complete installation guide in readme

parent 9fc00ac7
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,53 @@
## Required software (on ubuntu's OS family):
- `sudo apt-get install libpq-dev python-dev postgresql postgresql-contrib python virtualenv python-virtualenv`
- After cloning the repository: `. env/bin/activate; pip install -r requirements.txt`
## Development
- Always start by activating _virtualenv_, by: `devel@host ~/home/smash $ . env/bin/activate`
## Postgres installation
- If you don't have postgres installed, complete step seven from [https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-django-with-postgres-nginx-and-gunicorn](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-django-with-postgres-nginx-and-gunicorn) (remember to save all the credentials, they will be necessary to run the application).
## Developer project installation
- `mkdir -p ~/dev/smash`
- `cd ~/dev/smash`
- `git clone ssh://git@git-r3lab-server.uni.lu:8022/piotr.atyjaszyk/scheduling-system.git`
- `cd scheduling-system`
- `virtualenv env` to create new virtualenv (contains clean python working environment)
- `. env/bin/activate` (to start using virtualenv)
- `pip install -r requirements.txt` to install project's dependencies
- Create `local_settings.py` file in `/scheduling-system/smash/web` directory, containing:
```
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'Paste long random string here' # Insert long random string
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
WSGI_APPLICATION = 'smash.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'smashdb', # Insert your database's name
'USER': 'postgresmashuser', # Insert your database's user
'PASSWORD': 'thePOSTGRESpassword', # Insert your user's password
'HOST': 'localhost',
'PORT': '' # '' === default one # Empty string is OK
# If to use sqlite
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
STATIC_ROOT = '/tmp/static'
```
## Development
- Remember, that before working you have to activate _virtualenv_, by: `devel@host ~/home/smash/scheduling-system $ . env/bin/activate`
- In order to run development server, run: `devel@host ~/home/smash/scheduling-system/smash $ ./manage.py runserver` and go to `127.0.0.1:8000` in browser
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment