Ticket #593 (new Task)

Opened 5 years ago

Last modified 3 years ago

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

comment:1 Changed 5 years ago by bryan

  • Status changed from new to assigned

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.

comment:2 Changed 5 years ago by bryan

  • Priority changed from issue to blocker

comment:3 Changed 5 years ago by bryan

  • Priority changed from blocker to critical

This turned out to be too hard for Paris ...

comment:4 Changed 4 years ago by bryan

  • Milestone changed from V1.0 CMIP5 Questionnaire Release to V1.1 Questionnaire Release

comment:5 Changed 3 years ago by bryan

  • Status changed from assigned to new
  • Owner changed from bryan to gerry
Note: See TracTickets for help on using tickets.