Skip to content
Snippets Groups Projects
Commit 00cc1f43 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Add i18n to grid model titles

parent 19255407
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@
{% if available_grid_models|length > 0 %}
<ul>
{% for model in available_grid_models %}
<li><a href="gridmap/{{model.model_id}}/">{{ get_text_i18n model.model_name }}</a></li>
<li><a href="gridmap/{{model.model_id}}/">{% get_text_i18n model.model_name %}</a></li>
{% endfor %}
</ul>
{% else %}
......
......@@ -3,16 +3,14 @@ from django.http import Http404
from django.conf import settings
# Fallback view - only displaying info for user to move on
def index(request):
context = {
"available_grid_models": settings.AVAILABLE_GRID_MODELS if hasattr(settings, "AVAILABLE_GRID_MODELS") else []
}
return render(request, 'spatial/index.html', context)
def psilartemp(request):
context = {}
return render(request, 'spatial/psilartemp.html', context)
# The main view. Expects a valid model_id, otherwise it defaults to index
def gridmap(request, model_id=None):
try:
for model in settings.AVAILABLE_GRID_MODELS:
......@@ -22,4 +20,11 @@ def gridmap(request, model_id=None):
except AttributeError:
pass
return redirect("../")
# TO BE REMOVED when the PSILARTEMP model has been harmonized with the VIPS gridded model format
def psilartemp(request):
context = {}
return render(request, 'spatial/psilartemp.html', context)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment