bene51 / omero_3Dscript

OMERO.web app to animate multi-dimensional microscopy using 3Dscript, directly from within the OMERO environment.
GNU General Public License v3.0
4 stars 0 forks source link

Use Django to generate base URLs #2

Closed will-moore closed 4 years ago

will-moore commented 4 years ago

When you create URLs such as '/omero_3dscript/startRendering', in the JavaScript code, you should base this on a Django-generated URL, e.g:

var BASE_3DSCRIPT_URL = "{% url '3Dscript_index' %}";

See example at https://github.com/ome/omero-figure/blob/master/omero_figure/templates/figure/index.html#L42 then use this global variable to create URLs.

This will include any web URL 'prefix' (see https://docs.openmicroscopy.org/omero/5.6.1/sysadmins/unix/install-web.html#customizing-your-omero-web-installation ) e.g. If using an 'omero' prefix as in the docs example, BASE_3DSCRIPT_URL will be /omero/omero_3dscript/.