A platform for managing training sessions and workshops to connect trainers and educational institutes interested in conducting training for their students.
This project is a fork of Anand Chitipothu's broadgauge project.
See requirements.txt
for the full set of
requirements.
The short version:
There are two stages to installing the dependencies; some you'll install system-wide and some you'll install in the project's Python virtual environment. The former set of dependencies guarantee the latter set can be installed successfully.
Using your package manager, install the following dependencies system-wide:
python
python-dev
postgresql
postgresql-server-dev-9.3
For example, on Ubuntu or any Debian-derivative:
sudo apt-get install python python-dev postgresql postgresql-server-dev-9.3
Let's say you're going to clone this GitHub repository into /home/me/src
and run the Broadgauge server as user me
.
cd /home/me/src
git clone git://github.com/PythonIreland/broadgauge.git
cd broadgauge
virtualenv -p $(which python2) .
. bin/activate
pip install -r requirements.txt
If pip install
fails, it'll be because you're missing a system-wide dependency.
The database is started automatically at installation time, running under the postgres
user account.
To start postgresql at login:
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
Then to load postgresql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Or, if you don't want/need launchctl, you can just run:
postgres -D /usr/local/var/postgres
See http://www.postgresql.org/docs/9.3/static/app-pg-ctl.html
The database login credentials used by Broadgauge can be found in broadgauge/default_settings.py
. Make a note of these.
Switch to the postgres
user account:
sudo -i -u postgres
Create the database:
createdb pythonexpress
createuser -P gerry
The database user's default password is myname1
. You'll be prompted to provide a password as you create the database user.
Switch to the postgres
user account:
sudo -i -u postgres
Check that the postgres
user has at least read-only access to the schema file in the home folder of user me
:
cat /home/me/src/broadgauge/broadgauge/schema.sql
If you see the contents of the file, you're good to go. Otherwise copy the file to /tmp.
Import the schema as database user gerry
:
psql -d pythonexpress -U gerry < /home/me/src/broadgauge/schema.sql
python run.py
Point your browser at http://localhost:8100/
You're up and running! Keep an eye on the terminal in which you started the Broadgauge server to check for errors.