Note
This documentation is for OMERO 5.2. This version is now in maintenance mode and will only be updated in the event of critical bugs or security concerns. OMERO 5.3 is expected before the end of 2016.
If you need to make changes to OMERO.web itself, then you will want to check out the OMERO source code. You can directly edit and run the OMERO.web code. This means that you benefit from the convenience of editing, saving and refreshing your browser without any build step.
However, you will still need to build OMERO (or download the release build) and set up your PYTHONPATH as described in the install documentation in order that you have the various dependencies such as Django.
You will then have 2 copies of the OMERO.web code - source code under components/tools/OmeroWeb/omeroweb and the server build under dist/lib/python/omeroweb.
To set up and run OMERO.web from the source code, you need to follow a few steps (commands are shown below):
Set OMERO_HOME, so that OMERO.web knows where to find config, write logs etc.
Warning
You should not set OMERO_HOME on production servers.
The examples below assume a developer environment, making appropriate use of OMERO internals. See Setting the OMERO_HOME environment variable for details.
Make sure that the Django libraries that are under the build: dist/lib/python/django are on your PYTHONPATH.
Make sure the OmeroWeb folder: components/tools/OmeroWeb is on your PYTHONPATH.
Remove the built omeroweb folder, otherwise this will get used instead of the source omeroweb
Note
You have to do this again if you build the server
From the source omeroweb/ folder, manually run the Django development server
# Example path to build target or downloaded directory
$ export OMERO_HOME = ~/Desktop/OMERO/dist
# Make sure the Django code etc can be imported
$ export PYTHONPATH=$OMERO_HOME/lib/python/:$OMERO_HOME/../components/tools/OmeroWeb:$PYTHONPATH
$ cd $OMERO_HOME
# need to remove the built omeroweb code so it doesn't get imported
$ rm -rf lib/python/omeroweb/
$ cd ../components/tools/OmeroWeb
$ python omeroweb/manage.py runserver
Validating models...
0 errors found
December 05, 2013 - 13:39:26
Django version 1.8, using settings 'omeroweb.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Note
Default port number is 8000. To specify port, use E.g: $ python manage.py runserver 0.0.0.0:4080