Ticket #593 (new Task)
Need configurable URL prefix for case where Questionnaire run from non-root location
| Reported by: | pjkersha | Owned by: | gerry |
|---|---|---|---|
| Priority: | critical | Milestone: | V1.2 Questionnaire release |
| Component: | WP6 - CMIP5 Questionnaire | Version: | |
| Keywords: | Cc: | ||
| Requirement: | http://metaforclimate.eu/Work-Package-2/Developing-the-CIM/Project-Requirements-summary.htm | ||
Description
The paths set in the template files expect a root location for the mount point of the Django app e.g. centres.html:
<form action='/cmip5/centres/' method='post'>
It breaks then if the app is mounted at e.g. metafor - https://ceda.ac.uk/metafor/:
WSGIScriptAlias /metafor "/usr/local/apache2/wsgi_scripts/cmip5q.wsgi"
An option in settings.py could set a prefix e.g.
URL_PREFIX = '/metafor'
and in the template:
<form action='{{URL_PREFIX}}/cmip5/centres/' method='post'>
Change History
Note: See
TracTickets for help on using
tickets.

Good idea, but no cigar, the place to fix things is in the urls.py routine, and your proposed mechanism doesn't quite work for that ... but we can probably finesse it in another way.