forked from geosolutions-it/geonode-mapstore-client
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98383f4
commit 38a00c3
Showing
6 changed files
with
32 additions
and
5 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
geonode_mapstore_client/templates/geonode-mapstore-client/app/geostory.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{% load static %} | ||
{% load client_version %} | ||
|
||
{% include '../_geonode_config.html' with is_embed=is_embed is_app=True plugins_config_key=plugins_config_key|default:'geostory' is_new_resource=is_new|default:'true' %} | ||
<script id="ms2-api" src="{% static 'mapstore/dist/gn-geostory.js' %}"></script> | ||
<script id="ms2-api" src="{% static 'mapstore/dist/gn-geostory.js' %}?{% client_version %}"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
import logging | ||
|
||
from django import template | ||
from django.conf import settings | ||
|
||
logger = logging.getLogger(__name__) | ||
register = template.Library() | ||
|
||
|
||
@register.simple_tag | ||
def client_version(): | ||
try: | ||
file_path = os.path.join( | ||
settings.STATIC_ROOT, | ||
'mapstore/version.txt' | ||
) | ||
with open(file_path, 'r') as f: | ||
version = f.read() | ||
return version | ||
except Exception as e: | ||
logger.error(e) | ||
return '' |