Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j7mER-0001YJ-UK for pgadmin-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 20:27:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j7mDS-00016G-Mp for pgadmin-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 20:26:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j7mDS-000169-9n for pgadmin-hackers@lists.postgresql.org; Fri, 28 Feb 2020 20:26:34 +0000 Received: from mail-vs1-xe33.google.com ([2607:f8b0:4864:20::e33]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j7mDP-0002lj-Sq for pgadmin-hackers@lists.postgresql.org; Fri, 28 Feb 2020 20:26:33 +0000 Received: by mail-vs1-xe33.google.com with SMTP id n27so2817227vsa.0 for ; Fri, 28 Feb 2020 12:26:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xtremedatainc-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=6g/C22TFLUs4gTg8UmOBGLOWpwn12MqBgQ0IBNUjD/E=; b=bIEfPgzDDRZOQto8yAQNXb0OlZlSN+0EITrBPROex1/PHLWWdHGSFJYb4Uv+7gMIyK axo35YNyJPpA2yTbNCxdAEdzWch4E5m7otTKHxS3qcDrxb0a45hfJK1ual7soWzfdyE7 InKxoR6c2BjOLF7RYWbQKLXravSvVGiOX39xF1FmgLDO9wN2XA7GiUCHMDmLH+PEXGs3 mtweCwl/LiVuaO02T7tVMa5EpUIcZDy5KgnSSNU/Hlhv8GlwSZ7PE79nU/Kyr7Joqpfg HsnXPrWeDtQLiDo7IETaAiqSGotyen2AjF027PnXwxUcOEikZSTati1N1HuVK+WK0ZHm /s8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=6g/C22TFLUs4gTg8UmOBGLOWpwn12MqBgQ0IBNUjD/E=; b=KZ/lw3rJwzLP9ALYOzICHwS13Q4iuSA29EWqWq0D8f1npV9Csw5KXDQFZW/My5Zx8y aeiuZKcPItb2V9rsCVhOawJm6Kn/EmF/xa4QdpzJkylmlw+dQExF5xDei4tZ8uWPjbCE WmCqmntNE9DGOzmqxJ48l0gmYcEoliuqmsUv5xD2VrsJD/ktHDejSWZOybPT51LNtphT Kvqb7DaTvaLry2aCN7vpcMupM2Ofq+vnpdvH8TRYRdYu/srlnPKWhncpY5XvlLBS/2Go Fu6oot0y6Lg2Qsw3pmUxFT4XamOMvEH4FsrnjGhAtCZzxn8kTqU4DxD3g7ycaPc3Py5w BfVQ== X-Gm-Message-State: ANhLgQ31EDA4MPQtcxZMl2jBbF8zyJAum/ZqLI+vN1p+MQH45OeTCVvC GjVh7/wjz7JNCS4azDF5VKX4GmKJaE7zudg/FEW0U6QZscDkMw== X-Google-Smtp-Source: ADFU+vs82IBZPI0C3ClIJrhQqjeh2itkVokZkW6Z6xXa/yOXy3FEonU9lTmNCe74mhPN/QnJF1+P4eynGDoWZLILxtg= X-Received: by 2002:a67:d703:: with SMTP id p3mr3983192vsj.185.1582921589417; Fri, 28 Feb 2020 12:26:29 -0800 (PST) MIME-Version: 1.0 From: Radoslaw Garbacz Date: Fri, 28 Feb 2020 14:26:18 -0600 Message-ID: Subject: 'render_template' server_type/version resolution To: pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000000b7be8059fa8a766" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000000b7be8059fa8a766 Content-Type: text/plain; charset="UTF-8" Hi, I have a question regarding templates resolution from subdirectories based on server version (and type) for 'SQL' templates (e.g. for "get_encodinds.sql" in "web/pgadmin/browser/server_groups/servers/databases/"). I created a subdirectory matching my pg like db version: "web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/8.1_plus". I have also a specific subdir for "server_type_version" (.../dbx_8.1_plus), however the server does not seem to be able to find it, and always defaults to ".../templates/databases/sql/default". When debugging, I get "self.template_path" as "databases/sql/#80102#" (server_type: "dbx", however it's not used for "get_encodings"). So, I'd be grateful to hear how to make it find my modified "get_encodings.sql"? BTW: Is it OK if the directory is a link? -- Best Regards, Radoslaw Garbacz XtremeData Incorporated --0000000000000b7be8059fa8a766 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I have a question regarding tem= plates resolution from subdirectories based on server version (and type) fo= r 'SQL' templates (e.g. for "get_encodinds.sql" in "= web/pgadmin/browser/server_groups/servers/databases/").

=
I created a subdirectory matching my pg like db version: "w= eb/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/= 8.1_plus". I have also a specific subdir for "server_type_version= " (.../dbx_8.1_plus), however the server does not seem to be able to f= ind it, and always defaults to ".../templates/databases/sql/default&qu= ot;.

When debugging, I get "self.template_pat= h" as "databases/sql/#80102#" (server_type: "dbx",= however it's not used for "get_encodings").
So, I'd be grateful to hear how to make it find my modifie= d "get_encodings.sql"?
BTW: Is it OK if the directory i= s a link?

--
Best Regar= ds,

Radoslaw Garbacz
XtremeData Incorporated
--0000000000000b7be8059fa8a766--