public inbox for [email protected]
help / color / mirror / Atom feed'render_template' server_type/version resolution
2+ messages / 2 participants
[nested] [flat]
* 'render_template' server_type/version resolution
@ 2020-02-28 20:26 Radoslaw Garbacz <[email protected]>
2020-03-02 03:40 ` Re: 'render_template' server_type/version resolution Khushboo Vashi <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Radoslaw Garbacz @ 2020-02-28 20:26 UTC (permalink / raw)
To: pgadmin-hackers <[email protected]>
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: 'render_template' server_type/version resolution
2020-02-28 20:26 'render_template' server_type/version resolution Radoslaw Garbacz <[email protected]>
@ 2020-03-02 03:40 ` Khushboo Vashi <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Khushboo Vashi @ 2020-03-02 03:40 UTC (permalink / raw)
To: Radoslaw Garbacz <[email protected]>; +Cc: pgadmin-hackers <[email protected]>
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
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-03-02 03:40 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-28 20:26 'render_template' server_type/version resolution Radoslaw Garbacz <[email protected]>
2020-03-02 03:40 ` Khushboo Vashi <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox