public inbox for [email protected]
help / color / mirror / Atom feedFrom: Khushboo Vashi <[email protected]>
To: Radoslaw Garbacz <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: 'render_template' server_type/version resolution
Date: Mon, 2 Mar 2020 09:10:56 +0530
Message-ID: <CAFOhELdSHMHicD=Rj2b8mWFgxZNXkWxnp3XY00nupQveyRTg7w@mail.gmail.com> (raw)
In-Reply-To: <CAHBw7oT+50c1+Ns_Yy-x2S6r49Y_iqz_G22NdheWpgzqAjfLHw@mail.gmail.com>
References: <CAHBw7oT+50c1+Ns_Yy-x2S6r49Y_iqz_G22NdheWpgzqAjfLHw@mail.gmail.com>
Hi,
On Sat, Feb 29, 2020 at 1:56 AM Radoslaw Garbacz <
[email protected]> wrote:
> 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".
>
> pgAdmin does not support PostgreSQL absolute versions. However if you want
to make local changes in the template loader mechanism, check the <pgAdmin
Source Dir>/web/pgadmin/utils/versioned_template_loader.py file to
understand the template loader mapping logic.
Thanks,
Khushboo
> 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
>
view thread (2+ messages)
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], [email protected], [email protected]
Subject: Re: 'render_template' server_type/version resolution
In-Reply-To: <CAFOhELdSHMHicD=Rj2b8mWFgxZNXkWxnp3XY00nupQveyRTg7w@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