public inbox for [email protected]
help / color / mirror / Atom feedFrom: Murtuza Zabuawala <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][RM#3139] Create proper template path if Windows
Date: Mon, 12 Mar 2018 19:45:36 +0530
Message-ID: <CAKKotZSDVNp73-NJ3WFJi=SBNNQ7Mu0SjfLmOcLcGTdFFxbmow@mail.gmail.com> (raw)
Hi,
PFA patch to correct the template path generation logic incase of Windows
system.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
[application/octet-stream] RM_3139.diff (1.3K, 3-RM_3139.diff)
download | inline diff:
diff --git a/web/pgadmin/utils/compile_template_name.py b/web/pgadmin/utils/compile_template_name.py
index 1e0b94fa..1232b6a0 100644
--- a/web/pgadmin/utils/compile_template_name.py
+++ b/web/pgadmin/utils/compile_template_name.py
@@ -11,10 +11,13 @@ import os
def compile_template_name(
template_prefix, template_file_name, server_type, version):
- return os.path.join(
- compile_template_path(template_prefix, server_type, version),
- template_file_name
- )
+
+ # 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, server_type, version) + \
+ '/' + template_file_name
+
def compile_template_path(template_prefix, server_type, version):
@@ -22,4 +25,8 @@ def compile_template_path(template_prefix, server_type, version):
version_path = '#{0}#{1}#'.format(server_type, version)
else:
version_path = '#{0}#'.format(version)
- return os.path.join(template_prefix, version_path)
+
+ # 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
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin4][RM#3139] Create proper template path if Windows
In-Reply-To: <CAKKotZSDVNp73-NJ3WFJi=SBNNQ7Mu0SjfLmOcLcGTdFFxbmow@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox