Note: All steps performed from root project directory unless otherwise specified
sudo su - postgres
createuser -P ims
createdb -O ims ims
You can exit the postgres user shell after this step.
Talk to Jordan or Kyri for data, it will be in a .tar.gz
cd /path/to/data
tar -xzf im_data.tar.gz
A few dependencies you might need to complete further steps (required on Ubuntu 16.04):
sudo apt-get install libsqlite3-dev libpq-dev postgresql-server-dev-9.5
bundle install
ruby bin/migrations.rb
sed -i -e 's/:datetime$/DateTime/' migrate/*.rb
sed -i -e 's/:binary$/:bytea/' migrate/*.rb
sequel -m ./migrate postgres://ims:<password>@localhost/ims
This step will take a while.
ruby bin/import_data.rb
Install python dependencies (if using virtual environment, make sure it is activated prior to this step)
pip install requirements.txt
- run from ims/ims
python manage.py inspectdb > reports/models.py
- run from ims/ims
python ./manage.py shell
Check that Sord object contains records
from reports.models import Sord
Sord.objects.all()
- run from ims/ims
python manage.py runserver
- In a web-browser, navigate to http://127.0.0.1:8000/reports/sales_invoice_order_report/ and enter a sales order number