misc: add hash to godo.js URI (#61448)
This commit is contained in:
parent
b2ad2f3641
commit
277415b4b3
|
@ -14,6 +14,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import hashlib
|
||||
|
||||
from quixote import get_publisher, get_request, get_response, get_session
|
||||
|
||||
|
||||
|
@ -28,6 +30,8 @@ def publisher(request):
|
|||
if request.path.startswith('/backoffice/'):
|
||||
template_base = 'wcs/blank.html'
|
||||
|
||||
from wcs.qommon.admin.menu import get_vc_version
|
||||
|
||||
return {
|
||||
'publisher': get_publisher,
|
||||
'response': get_response,
|
||||
|
@ -35,4 +39,5 @@ def publisher(request):
|
|||
'template_base': template_base,
|
||||
'global_context': get_global_context,
|
||||
'session_message': lambda: get_session() and get_session().display_message(),
|
||||
'version_hash': hashlib.md5(str(get_vc_version()).encode()).hexdigest(),
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}" {% endfor %}
|
||||
class="mini-rich-text">{{widget.value|default:""}}</textarea>
|
||||
<script type="module">
|
||||
import Godo from "/static/xstatic/js/godo.js";
|
||||
import Godo from "/static/xstatic/js/godo.js?{{version_hash}}";
|
||||
new Godo(document.getElementById('form_{{widget.name}}'), {schema: 'basic'});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue