Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
To learn more about this project, read the wiki.

SMart SCHeduling

Required software (on ubuntu's OS family):

  • sudo apt-get install libpq-dev python-dev postgresql postgresql-contrib python virtualenv python-virtualenv

Postgres installation

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/smash directory (see template below), and change your connection data:
# 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