mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-01 21:09:10 -06:00
29 lines
963 B
Python
29 lines
963 B
Python
##########################################################################
|
|
#
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
#
|
|
# Copyright (C) 2013 - 2023, The pgAdmin Development Team
|
|
# This software is released under the PostgreSQL Licence
|
|
#
|
|
##########################################################################
|
|
|
|
|
|
def compile_template_name(
|
|
template_prefix, template_file_name, version):
|
|
|
|
# Template path concatenation should be same as
|
|
# Ref: ../pgadmin4/web/pgadmin/utils/versioned_template_loader.py +54
|
|
# to avoid path mismatch in windows
|
|
return compile_template_path(template_prefix, version) + \
|
|
'/' + template_file_name
|
|
|
|
|
|
def compile_template_path(template_prefix, version):
|
|
|
|
version_path = '#{0}#'.format(version)
|
|
|
|
# Template path concatenation should be same as
|
|
# Ref: ../pgadmin4/web/pgadmin/utils/versioned_template_loader.py +54
|
|
# to avoid path mismatch in windows
|
|
return template_prefix + '/' + version_path
|