OpenREM Release Notes version 0.4.3

Headline changes

  • Export of study information is now handled by a task queue - no more export time-outs.
  • Patient size information in csv files can now be uploaded and imported via a web interface.
  • Proprietary projection image object created by Hologic tomography units can now be interrogated for details of the tomosynthesis exam.
  • now ships with its proper name, this will overwrite important local settings if upgrade is from 0.3.9 or earlier.
  • Time since last study is no longer wrong just because of daylight saving time!
  • Django release set to 1.6; OpenREM isn’t ready for Django 1.7 yet
  • The inner openrem Django project folder is now called openremproject to avoid import conflicts with Celery on Windows
  • DEBUG mode now defaults to False

Specific upgrade instructions

Always make sure you have converted your database to South before attempting an upgrade

Quick reminder of how, if you haven’t done it already:


python /usr/local/lib/python2.7/dist-packages/openrem/ convert_to_south remapp


python C:\Python27\Lib\site-packages\openrem\ convert_to_south remapp

Upgrading from 0.3.9 or earlier

It is essential that you upgrade to at least 0.4.0 first, then upgrade to 0.4.3. Otherwise the settings file will be overwritten and you will lose your database settings. There is also a trickier than usual database migration and instructions for setting up users. Fresh installs should start with the latest version.

Upgrade to version 0.4.2

pip install openrem==0.4.2

(Will need sudo or equivalent if using linux without a virtualenv)

Then follow the instructions in OpenREM Release Notes version 0.4.0 from migrating the database onwards, before coming back to these instructions.

Upgrading from 0.4.0 or above

Install OpenREM version 0.4.3

pip install openrem==0.4.3

(Will need sudo or equivalent if using linux without a virtualenv)


The message broker RabbitMQ needs to be installed to enable the export and upload features

Move and edit file and files

The inner openrem Django project folder has now been renamed openremproject to avoid import confusion that prevented Celery working on Windows.

When you upgrade, the file and the file will remain in the old openrem folder. Both need to be moved across to the openremproject folder, and edited as below.

The new and old folders will be found in:

  • Linux: /usr/local/lib/python2.7/dist-packages/openrem/
  • Linux with virtualenv: /home/myname/openrem/lib/python2.7/site-packages/openrem/
  • Windows: C:\Python27\Lib\site-packages\openrem\

Edit the file

The MEDIA_ROOT path needs to be defined. This is the place where the study exports will be stored for download and where the patient size information csv files will be stored temporarily whilst they are bing processed.

The path set for MEDIA_ROOT is up to you, but the user that runs the webserver must have read/write access to the location specified because it is the webserver than reads and writes the files. In a debian linux, this is likely to be www-data for a production install. Remember to use forward slashes in the config file, even for Windows.

Linux example:

MEDIA_ROOT = "/var/openrem/media/"

Windows example:

MEDIA_ROOT = "C:/Users/myusername/Documents/OpenREM/media/"

The ALLOWED_HOSTS needs to be defined, as the DEBUG mode is now set to False. This needs to contain the server name or IP address that will be used in the URL in the web browser. For example:


A dot before a hostname allows for subdomains (eg www.doseserver), a dot after a hostname allows for FQDNs (eg Alternatively, a single '*' allows any host, but removes the security the feature gives you.

Edit the file with the new project folder name

If you aren’t using the file as part of your webserver setup, you might like to simply rename the file in the openremproject folder.

If you are using it, edit the line:

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "openrem.settings")

to read:

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "openremproject.settings")

Tidying up

Finally, you should delete the old openrem folder - you might like to take a backup first!

Database migration

Assuming no virtualenv


python /usr/local/lib/python2.7/dist-packages/openrem/ schemamigration --auto remapp
python /usr/local/lib/python2.7/dist-packages/openrem/ migrate remapp


C:\Python27\Lib\site-packages\openrem\ schemamigration --auto remapp
C:\Python27\Lib\site-packages\openrem\ migrate remapp

Web server

If you are using a production webserver, you will probably need to edit some of the configuration to reflect the change in location of, for example DJANGO_SETTINGS_MODULE = openremproject.settings, and then restart the web server. You may need to do something similar for the location of

If you are using the built-in test web server (not for production use), then the static files will not be served unless you add --insecure to the command. This is one of the consequences of setting DEBUG to False:

python runserver x.x.x.x:8000 --insecure

Start the Celery task queue


The webserver and Celery both need to be able to read and write to the MEDIA_ROOT location. Therefore you might wish to consider starting Celery using the same user or group as the webserver, and setting the file permissions accordingly.

For testing, in a new shell: (assuming no virtualenv)


cd /usr/local/lib/python2.7/dist-packages/openrem/
celery -A openremproject worker -l info


cd C:\Python27\Lib\site-packages\openrem\
celery -A openremproject worker -l info

For production use, see