Removed the sys.path manipulation code from the import scripts again, as per 70888d1 and ref #73. This was reverted in fce9dd302bda and 15001b9222dd for #83 due to extraction scripts not functioning in virtualenv on linux. The existing code wouldn't work with debian installs due to assumption of site-packages instead of dist-packages. However, it seems that the correct thing to do would be to do: from openrem.remapp.extractors import rdsr, hence this commit. I think this will then break the openrem.settings finding, but this should be dealt with in the extractor codes, not here. We'll probably need to set the DJANGO_SETTINGS_MODULE to openrem.openrem.settings and then we'll not need the openrem_settings code at all. Refs #99.
Tested using ubuntu virtualenv install. rdsr script doesn't attempt to do anything to the path, but relies on site-packages or dist-packages being on the python path so that openrem.remapp.extractors.rdsr can be imported. rdsr.py now sets the DJANGO_SETTINGS_MODULE to openrem.openrem.settings instead of openrem.settings, and doesn't make use of the name_of_project function, which is no longer relevant as openrem is packaged as the application rather than remapp. Needs testing outside of virtualenv on Ubuntu, and in and out on Windows. Other scripts need to be changed in the same way. Refs #99.
Made necessary changes to mam.py and ct_philips.py. Left ptsizecsv2db.py for now as the develop version has changed too significantly since this branch was created, so this needs to be done after the merge. Refs #99.
Modified rdsr.py to set the DJANGO_SETTINGS_MODULE to openrem.settings as the project folder is on the path, and in the Windows virtualenv openrem.openrem.settings failed to import if the project was on the path. Refs #99.
The format that worked for rdsr in a virtualenv on Windows doesn't work for Ubuntu in a virtual machine. django.db requires openren.openrem.settings, even with the project on the path. Tried adding a try except Import Error but it failed somewhere in the remapp.models. Settled on setting DJANGO_SETTINGS_MODULE to openrem.openrem.settings and importing django.db.models, then adding the projec to the path and importing rempapp.models.General_study_module_attributes. Needs testing in Windows again. Refs #99.