[PATCH] pgweb: Add ARCHIVES_FRONT_ADDRESS to allow configuration of archives

Поиск
Список
Период
Сортировка
Искать

[PATCH] pgweb: Add ARCHIVES_FRONT_ADDRESS to allow configuration of archives

От:
Célestin Matte <celestin.matte@cmatte.me>
Дата:
Вложения:
Hello,

Domain of messages in pgweb's search is currently hardcoded as postgresql.org
in templates/search/listsearch.html. This patch allows to use another domain
for links to messages in archives in the search function.
Since pgarchives' domain can differ from pgweb's one, a new variable is defined
for that purpose instead of using SITE_ROOT.

Cheers,
-- 
Célestin Matte

Re: [PATCH] pgweb: Add ARCHIVES_FRONT_ADDRESS to allow configuration of archives

От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Tue, Oct 26, 2021 at 4:34 PM Célestin Matte <celestin.matte@cmatte.me> wrote:
Hello,

Domain of messages in pgweb's search is currently hardcoded as postgresql.org
in templates/search/listsearch.html. This patch allows to use another domain
for links to messages in archives in the search function.
Since pgarchives' domain can differ from pgweb's one, a new variable is defined
for that purpose instead of using SITE_ROOT.

This patch adds a new parameter ARCHIVES_FRONT_ADDRESS, which is then never used. Instead it passes in ARCHIVES_SEARCH_SERVER into the templates.

I'm pretty sure that's not intentional? They should both b ARCHIVES_FRONT_ADDRESS?

--

Re: [PATCH] pgweb: Add ARCHIVES_FRONT_ADDRESS to allow configuration of archives

От:
Célestin Matte <celestin.matte@cmatte.me>
Дата:
Вложения:
> This patch adds a new parameter ARCHIVES_FRONT_ADDRESS, which is then never used. Instead it passes in ARCHIVES_SEARCH_SERVER into the templates.
> 
> I'm pretty sure that's not intentional? They should both b ARCHIVES_FRONT_ADDRESS?

Oops, indeed, this is the product of a failed git merge --squash.

Fixed patch attached.
-- 
Célestin Matte

Re: [PATCH] pgweb: Add ARCHIVES_FRONT_ADDRESS to allow configuration of archives

От:
Célestin Matte <celestin.matte@cmatte.me>
Дата:
Вложения:
Hello,

Here's a similar patch for pgarchives, in which the search forms also point to www.postgresql.org.

I'm adding this patch to the same thread to avoid spreading the discussion.

Cheers,
-- 
Célestin Matte

Re: [PATCH] pgweb: Add ARCHIVES_FRONT_ADDRESS to allow configuration of archives

От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Wed, Oct 27, 2021 at 11:45 AM Célestin Matte
 wrote:
>
> > This patch adds a new parameter ARCHIVES_FRONT_ADDRESS, which is then never used. Instead it passes in ARCHIVES_SEARCH_SERVER into the templates.
> >
> > I'm pretty sure that's not intentional? They should both b ARCHIVES_FRONT_ADDRESS?
>
> Oops, indeed, this is the product of a failed git merge --squash.
>
> Fixed patch attached.

Finally cycling back to this one, sorry about the long delay. This
does look much better, applied with th modification that it should
take the whole URL and not just the hostname -- which maks it work
better in development for example.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/


Re: [PATCH] pgweb: Add ARCHIVES_FRONT_ADDRESS to allow configuration of archives

От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Wed, Oct 27, 2021 at 11:58 AM Célestin Matte
 wrote:
>
> Hello,
>
> Here's a similar patch for pgarchives, in which the search forms also point to www.postgresql.org.
>
> I'm adding this patch to the same thread to avoid spreading the discussion.

Thanks!

This also looks like a good idea,  but I instead choose to put it in
NavContext to be consistent with allow_resend which also just maps a
setting from settings.py -> the templates.

It should also be the full url and not hardcoded to https, same as the
one for the main website. Fixed as well.

Finally it was also not updating the form for the general search,
which should of course be treated by the same setting.


-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/


FAQ