Make it possible to (easily) run OpenREM in (IIS) virtual directory
If you run multiple instances of OpenREM on one server, you might want to host the different instances in virtual directories to easily access the different instances, e.g.: http://server/TST http://server/PRD
To make this easily available it would be handy to have a parameter available in local_settings.py to set this virtual directory.
Comments (29)
-
reporter -
reporter Refs
#667Changed templates to use VIRTUAL_DIRECTORY (needed a templatetag for that)
changed views.py to use VIRTUAL_DIRECTORY
→ <<cset bd82560e89d0>>
-
reporter Refs
#667Makes it possible to run OpenREM in (IIS) virtual directory.Added the option to specify VIRTUAL_DIRECTORY in local_settings.py.example Changed openremproject/urls.py to include the option.
→ <<cset 7261d4eba1a2>>
-
reporter Refs
#667Changed templates to use VIRTUAL_DIRECTORY (needed a templatetag for that)
changed views.py to use VIRTUAL_DIRECTORY
→ <<cset 2750c915de31>>
-
reporter Refs
#667Changed more templates.
I wonder if it would be better to use the url reverse lookup option to prevent hard-coded urls in the templates and views.py. Of course you then would have hard-coded names (but you can change the url, without having to change the templates and/or views.py). Actually all the changes for this issue would become obsolete. The only change needed would be in openremproject/urls.py.
A few items still need to be changed (mainly in the DICOM settings page).
→ <<cset 49328906f33c>>
-
I haven't checked - can you use URL reverse lookup in templates? Or would they have to be fed through?
-
reporter You can use it by using the template tag {% url 'pagename' %}. Actually there are templates in OpenREM that use this.
-
Of course. That sounds familiar! Thanks!
-
reporter Refs
#667Changed all hard-coded urls in templates to reverse url lookup.
-
Script parts have to be done
-
Little testing has been done, but it seems to work fine.
→ <<cset c95ca365bf2d>>
-
-
reporter Refs
#667Fixed problems with ajax update due to wrong url lookup. Everything seems to work fine, but urls in "static javascripts" are still hardcoded.
So, TODO: replace hard-coded urls in javascript-files. Solution for this might be: https://github.com/ierror/django-js-reverse
→ <<cset db01787a1b53>>
-
reporter Refs
#667Replaced static URL in js-files using django-js-reverse. So now all static URLs are replaced by URL-names.
The use of django-js-reverse implies that for every new release the static reverse.js has to be created by performing: python manage.py collectstatic_js_reverse
Running on the IIS root everything seems fine (so no degradation). Running in a virtual directory using IIS, the admin user has to login several times and javascript doesn't seem to run nicely.
→ <<cset 54bad041cb21>>
-
reporter I found the problem for the java part. Django-js-reverse doesn't recognise that the urls are imported indirectly with a leading virtual directory.
-
reporter Refs
#667See what Codacy thinks of changes in reverse-js-template.
[skip ci]
→ <<cset 5297e49c2650>>
-
@LuukO and @edmcdonagh, it seems that Codacy doesn't like the reverse.js file very much. As this is a library file it may be a good idea to exclude it from the Codacy checking. I've just tried to do this, but don't seem able to at the moment. Perhaps we should include a Codacy configuration file in the OpenREM project (https://support.codacy.com/hc/en-us/articles/360005097654-Ignore-files-from-Codacy-analysis)?
-
reporter Refs Issue
#667Hopefully removed the strange ascii code 26 in reversie.js just before the end of the file. This seemed to be an issue for codacy to evaluate the file.
[skip ci]
→ <<cset 6ca7fa228fe4>>
-
reporter -
reporter -
reporter -
reporter Refs issue
#667Updated documentation. - Added document for virtual directory settings - Added a link to the document in the installation document.
→ <<cset ea1424a14510>>
-
Thanks for adding docs @LuukO - can you change the example virtual directory please - most of the default site runs in a folder called
openrem
, so that might make people think they need to use this when they don't. Maybehttp://server/dms/
or something.Thanks again.
-
Look to docs for this branch: https://docs.openrem.org/en/issue667runopenreminvirtualdir/
-
reporter -
Removing static URLs. Refs
#479,#667→ <<cset 0d3a7161ddf8>>
-
Attempt to fix urls after merge. Refs
#667→ <<cset 0586a5a9b823>>
-
- changed milestone to 0.8.2
-
- changed status to resolved
Merged in Issue667RunOpenremInVirtualDir (pull request #232)
Fixes Issue
#667Approved-by: David Platten Approved-by: Ed McDonagh
→ <<cset e73e83e82e71>>
-
Corrects reverse URL lookup for reprocess_dual. Refs
#691,#667→ <<cset 14881a6fda58>>
-
- changed milestone to 0.9.0
-
Updating changes with ref
#667which fixes#461. [skip ci] docs only→ <<cset 45231754333d>>
- Log in to comment
Refs
#667Makes it possible to run OpenREM in (IIS) virtual directory.Added the option to specify VIRTUAL_DIRECTORY in local_settings.py.example
Changed openremproject/urls.py to include the option.
→ <<cset 18b519499ae5>>