public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dave Page <[email protected]>
To: Murtuza Zabuawala <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin4][RM#3139] Create proper template path if Windows
Date: Tue, 13 Mar 2018 08:50:36 -0400
Message-ID: <CA+OCxoxPa3=664RSrTdmNnVAzCXymkv07q-EeDVbU8-fFaP_Sg@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxoz6_QYKsRnBZeg65-DaSUvr8aR36WcKExd0DY038_ORww@mail.gmail.com>
References: <CAKKotZSDVNp73-NJ3WFJi=SBNNQ7Mu0SjfLmOcLcGTdFFxbmow@mail.gmail.com>
<CA+OCxoyZpBo4M9LqGF=3p6sQLZ4xZfgFB=+1sRh1dQN7XwOoug@mail.gmail.com>
<CAKKotZRxjPX6Gb5ax2HgjShzoHzVBL2F-Me=Uoa0+dV3fgspsA@mail.gmail.com>
<CA+OCxoz6_QYKsRnBZeg65-DaSUvr8aR36WcKExd0DY038_ORww@mail.gmail.com>
And... reverted. It seems this makes Jenkins very unhappy.
On Tue, Mar 13, 2018 at 7:58 AM, Dave Page <[email protected]> wrote:
> OK, thanks. Patch applied.
>
> On Tue, Mar 13, 2018 at 12:32 AM, Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> We are not joining template path with os.path.join because we are passing
>> prefix paths in render_template(..) at many places,
>> we are passing them as below,
>>
>> Some of examples,
>>
>> render_template(
>> "exclusion_constraint/js/exclusion_constraint.js",
>> _=_
>> ),
>>
>> recovery_check_sql = render_template(
>> "connect/sql/#{0}#/check_recovery.sql".format(postgres_version))
>>
>> sql = render_template(
>> "/servers/sql/#{0}#/stats.sql".format(manager.version),
>> conn=conn, _=gettext
>> )
>>
>> sql = render_template(
>> "/".join([self.template_path, 'create.sql']),
>> data=data, conn=self.conn
>> )
>>
>> def csssnippets(self):
>> """
>> Returns a snippet of css to include in the page
>> """
>> snippets = [render_template("css/servers.css")]
>>
>>
>> So again it will conflict if use os.path.join, To make it consistent with
>> render_template(...) and VersionedTemplateLoader(..) class we opt'd for
>> this mechanism.
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> On Tue, Mar 13, 2018 at 6:11 AM, Dave Page <[email protected]> wrote:
>>
>>> Hi
>>>
>>> On Mon, Mar 12, 2018 at 10:15 AM, Murtuza Zabuawala <
>>> [email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> PFA patch to correct the template path generation logic incase of
>>>> Windows system.
>>>>
>>>
>>> Seems like it would be better to fix it the other way round to me - e.g.
>>> update the template loader to use os.path.join.
>>>
>>> Any reason not to do that?
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
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], [email protected]
Subject: Re: [pgAdmin4][RM#3139] Create proper template path if Windows
In-Reply-To: <CA+OCxoxPa3=664RSrTdmNnVAzCXymkv07q-EeDVbU8-fFaP_Sg@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